Ambiguity between 'Rect' and '_fastcall Classes::Rect(int,int,int,int)'
BCB6.0 中编译出现:Ambiguity between 'Rect' and '_fastcall Classes::Rect(int,int,int,int)';
代码如下:
RECT rect=Rect(20,20,220,80);
this->Canvas->Rectangle(20,20,220,80);
DrawText(this->Canvas->Handle,"An example of DrawText.",1,&rect,DT_END_ELLIPSIS|DT_MODIFYSTRING);
怎么办啊。
[解决办法]
RECT rect=Rect(20,20,220,80);
换成:
RECT rect= { 20, 20, 220, 80 };
或者直接用TRect也行。