我定义了一个类CGraphic,其构造函数如下:
CGraphic(UINT, CPoint, CPoint);
然后构造对象:
CGraphic graphic(a, b, c);
a为UINT型,b为CPoint型, c为CPoint型~
可是编译出错了:
error C2664: '__thiscall CGraphic::CGraphic(class CPoint,class CPoint,unsigned int)' : cannot convert parameter 3 from 'class CPoint' to 'unsigned int'
怪了,怎么参数的顺序变反了~

解决方案 »

  1.   

    看看:
    a为UINT型,b为CPoint型, c为CPoint型
      

  2.   

    CGraphic(UINT, CPoint, CPoint);在定义时
    实参没有没和类中的成员变量有同名冲突?
      

  3.   

    楼上的,形参与类中的成员同名好像没什么关系吧~ 
    -----------------------------------------------看看:
    a为UINT型,b为CPoint型, c为CPoint型
    ,,,,,,
    这是什么意思啊~
      

  4.   

    cannot convert parameter 3 from 'class CPoint' to 'unsigned int'
    那不是提示第三个参数有问题了~~~
    你看一下参数三,有没有再其他地方定义参数c为UINT类型??