Я новичок в 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"
Да, также необходимо пространство имен std; – numerical25