CMyApp6View::CMyApp6View()
{
     m_rectEllipse(0,0,4000,-4000);//椭圆矩形为4*4厘米
m_nColor=DEFAULT_PALETTE;//设定刷子颜色
// TODO: add construction code here}m_rectEllipse申明为CRect错误为error C2064: term does not evaluate to a function
我不知道是哪里出错了

解决方案 »

  1.   

    m_rectEllipse(0,0,4000,-4000);//椭圆矩形为4*4厘米
    改为
    m_rectEllipse.SetRect(0,0,4000,-4000);//椭圆矩形为4*4厘米
    或者
    CRect m_rectEllipse(0,0,4000,-4000);//椭圆矩形为4*4厘米构造函数初始化,不能那样用
      

  2.   

    原句
    m_rectEllipse(0,0,4000,-4000)
    应该是
    CRect m_rectEllipse(0,0,4000,-4000)

    m_rectEllipse = CRect(0,0,4000,-4000)
    因为这样实际是调用了CRect的构造函数
      

  3.   

    m_rectEllipse(0,0,4000,-4000);//椭圆矩形为4*4厘米:::???????
      

  4.   

    hehe  upupup
    初始化错……
      

  5.   

    CMyApp6View::CMyApp6View():m_rectEllipse(0,0,4000,-4000)为什么不能这样写:
    CMyApp6View::CMyApp6View()
    {
    m_rectEllipse(0,0,4000,-4000);
    m_nColor=GRAY_BRUSH;
    }雷神的『VC++技术内幕』学习笔记,就像上面那样说的,但好像不行的。
      

  6.   

    CMyApp6View::CMyApp6View():m_rectEllipse(0,0,4000,-4000)这种写法是C++专用的一种在构造函数CMyApp6View()执行前调用的一种成员变量初始化的方法。请注意是在构造函数CMyApp6View()执行前调用,其实质也就是调用CRect的构造函数。这是特殊用法,直接写是不行的。