之前,我是新來的C++,要調試的代碼語法錯誤:缺少';'標識
class cGameError
{
string m_errorText;
public:
cGameError(char *errorText)
{
DP1("***\n*** [ERROR] cGameError thrown! text: [%s]\n***\n",
errorText);
m_errorText = string(errorText);
}
const char *GetText()
{
return m_errorText.c_str();
}
};
enum eResult
{
resAllGood = 0, // function passed with flying colors
resFalse = 1, // function worked and returns 'false'
resFailed = –1, // function failed miserably
resNotImpl = –2, // function has not been implemented
resForceDWord = 0x7FFFFFFF
};
這個頭文件中的以下行包括在程序作爲遵循
#include "string.h"
#include "stdafx.h"
#include "Chapter 01 MyVersion.h"
#include "cGameError.h"
是的,還需要名稱空間標準; – numerical25 2010-05-22 16:37:21