syntax error : missing ';' before identifier

Posted by numerical25 on Stack Overflow See other posts from Stack Overflow or by numerical25
Published on 2010-05-22T16:23:17Z Indexed on 2010/05/22 16:30 UTC
Read the original article Hit count: 157

Filed under:
|
|

I am new to c++, trying to debug the following line of code

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
};

This header file is included in the program as followed

#include "string.h"
#include "stdafx.h"
#include "Chapter 01 MyVersion.h"
#include "cGameError.h"

© Stack Overflow or respective owner

Related posts about c++

Related posts about c