头文件:
#if !defined(AFX_DATA_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_)
#define AFX_DATA_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
class CConfigInfo
{
public:
public:
static void Test();
};#endif // !defined(AFX_DATA_H__F77484C2_745F_11D3_A718_87712333104C__INCLUDED_)
实现文件:
#include "stdafx.h"
#include "Test.h"
#include "TestDlg.h"#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endifvoid CConfigInfo::Test()
{
CTestDlg aa;//出错
aa.DoModal();
}
编译提示:e:\giveup\testdlg.h(21) : error C2065: 'IDD_DIALOG1' : undeclared identifier
e:\giveup\testdlg.h(21) : error C2057: expected constant expression