Linking...
Employee.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CEmployee::GetRuntimeClass(void)const " (?GetRuntimeClass@CEmployee@@UBEPAUCRuntimeClass@@XZ)
Debug/职工档案.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Employee.obj : error LNK2001: unresolved external symbol "public: virtual struct CRuntimeClass * __thiscall CEmployee::GetRuntimeClass(void)const " (?GetRuntimeClass@CEmployee@@UBEPAUCRuntimeClass@@XZ)
Debug/职工档案.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
在.cpp文件中加一行IMPLEMENT_DYNCREATE(CEmployee, CObject)
在.h文件的类定义中加上DECLARE_DYNCREATE(CEmployee)
末尾不要有分号
在.h文件的类定义“中“加上DECLARE_DYNCREATE(CEmployee)末尾也不要有分号