处学VC,有个棘手的问题,希望明人解决
我建了一个 msg1 的 基于 基本对话框的 VC程序, 自己建立了一个叫 CPerson的类, 建立后,都能编译完成.
但问题来了,我在系统生成的 CMsg1Dlg类中, ADD member variable 添加了 CPerson 类的一个成员
class CMsg1Dlg : public CDialog
{
// Construction
public:
CPerson m_person;
CMsg1Dlg(CWnd* pParent = NULL); // standard constructor
.....
....
};
我已经#include "person.h"了
这样一来 编译就出错了 出错提示:
e:\vcstudy\msg1\msg1dlg.h(17) : error C2146: syntax error : missing ';' before identifier 'm_person'
e:\vcstudy\msg1\msg1dlg.h(17) : error C2501: 'CPerson' : missing storage-class or type specifiers
e:\vcstudy\msg1\msg1dlg.h(17) : error C2501: 'm_person' : missing storage-class or type specifiers
希望高手帮我解决一下, 给点信心, 目前极度郁闷中, 第一次调试程序,就编译不过去..