I'm using egcs 1.1.1. The following code:
(line 154)
Vector2 texEnd(float(sFontWidth[index]*2),float(-sFontHeight[index]*2));
(line 180)
gfxCard::Draw2D(Vector2(xIter+2,pos.y-2),dimensions,fontTable[*c],texEnd);
produces the error:
text.cpp:154: parse error before `*'
text.cpp:180: no matching function for call to `gfxCard::Draw2D (Vector2,
Vector2 &, Vector2 &, Vector2 ()(...))'
/home/uvatha/trex/render/card.h:23: candidates are: gfxCard::Draw2D(const
Vector2 &, const Vector2 &, const Vector2 &, const Vector2 &)
However, changing line 154 to read:
Vector2 texEnd((float)(sFontWidth[index]*2),(float)(-sFontHeight[index]*2));
Removes both of these errors. This is not the case on at least one other
compiler I've tried.
Why?