c++ - 关于在vs2013中写MFC出现的错误的修改
迷茫
迷茫 2017-04-17 13:46:03
0
1
561

无法用 "double" 类型的值初始化 "CWnd &" 类型的引用(非常量限定)

上图是出错的显示

void CDemoDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
    DDX_Control(pDX, IDC_Add1, m_add1);
    DDX_Control(pDX, IDC_Add2, m_add2);
    DDX_Control(pDX, IDC_Result, m_result);
    DDX_Control(pDX, IDC_Algorithm, m_algorithm);
    DDX_Control(pDX, IDC_Use, m_use);
    DDX_Control(pDX, IDC_Plus, m_plus);
}

出错的m_add1,m_add2,m_result,m_use,m_plus;

public:
    afx_msg void OnClose();
    double m_add1;
    double m_add2;
    double m_result;
    CStatic m_algorithm;
    BOOL m_use;
    int m_plus;

没法插入所以就贴出来

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
迷茫

It seems that the parameter type does not match

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template