在MFC生成的类中再声明自己定义的类,为什么出错??
MFC下添加自己定义的类CPointValue.h CPointValue.cpp
然后在MFC生成的类
class CDlgDlg : public CDialog
{
CPointValue *best;
}
出错如下
--------------------Configuration: dlg - Win32 Debug--------------------
Compiling...
dlgDlg.cpp
e:\mfc\dlg\dlgdlg.h(20) : error C2146: syntax error : missing ';' before identifier 'best'
e:\mfc\dlg\dlgdlg.h(20) : error C2501: 'CPointValue' : missing storage-class or type specifiers
e:\mfc\dlg\dlgdlg.h(20) : error C2501: 'best' : missing storage-class or type specifiers
Generating Code...
Compiling...
dlg.cpp
e:\mfc\dlg\dlgdlg.h(20) : error C2146: syntax error : missing ';' before identifier 'best'
e:\mfc\dlg\dlgdlg.h(20) : error C2501: 'CPointValue' : missing storage-class or type specifiers
e:\mfc\dlg\dlgdlg.h(20) : error C2501: 'best' : missing storage-class or type specifiers
Generating Code...
Error executing cl.exe.
dlg.exe - 6 error(s), 0 warning(s)