注册 登录
编程论坛 VC++/MFC

鸡啄米老师的实例,求指教

tangpengksec 发布于 2014-06-26 11:21, 783 次点击
各位大大们好,新人求教:鸡啄米老师的vs2010_MFC编程入门中第14讲属性对话框中的离子我照着写了,前面都能运行,后面加上使用说明的函数就不对了,求指教?谢谢。
void CAdditionDlg::OnBnClickedInstructButton()
{
    // TODO: Add your control notification handler code here
    CAddSheet sheet(_T(""));
    sheet.SetWizardMode();
    sheet.DoModal();
}
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(4): warning C4627: '#include "AddSheet.h"': skipped when looking for precompiled header use
1>          Add directive to 'StdAfx.h' or rebuild precompiled header
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(212): error C2065: 'CAddSheet' : undeclared identifier
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(212): error C2146: syntax error : missing ';' before identifier 'sheet'
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(212): error C3861: 'sheet': identifier not found
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(213): error C2065: 'sheet' : undeclared identifier
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(213): error C2228: left of '.SetWizardMode' must have class/struct/union
1>          type is ''unknown-type''
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(214): error C2065: 'sheet' : undeclared identifier
1>e:\my c++ program\鸡啄米\addition\addition\additiondlg.cpp(214): error C2228: left of '.DoModal' must have class/struct/union
1>          type is ''unknown-type''
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.12
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
已经包含"AddSheet.h"了。求好心大神们指教一下啊,谢谢

2 回复
#2
yuccn2014-06-27 17:33
'CAddSheet' : undeclared identifier

是否没有包含对应的头文件?
#3
NBABOY2014-06-30 02:54
他是跳过了头文件,那你重新编译。
添加那个常用的头文件了。单步调试一下嘛
1