代码问题
代码:
void CTrtDlg::OnAbout()
{
CAboutDlg dlg;
dlg.DoModal();
}
运行后有错误:
error C2065: 'CAboutDlg ' : undeclared identifier
error C2146: syntax error : missing '; ' before identifier 'dlg '
error C2065: 'dlg ' : undeclared identifier
error C2228: left of '.DoModal ' must have class/struct/union type
为什么?
[解决办法]
没有包含CAboutDlg的头文件。