class UTIL_API Exception
{
private:
string* _message;
string* _linenumber;
string* _source;
public:
Exception( void );
Exception( LPCTSTR, ... );
Exception( UINT, HRESULT=S_OK );
~Exception( void );
void append( LPCTSTR );
void setMessage( LPCTSTR );
void setSourceFile( LPCTSTR );
void setLineNumber( int );
void reportToDebug( );
LPCTSTR toString( );
};
OutputDebugString( (*_message).data() );
. But I got this runtime error:
First-chance exception at 0x77e6d756 in game.exe: Microsoft C++ exception: Exception @ 0x0012fc7c.
First-chance exception at 0x77e9bd4f in game.exe: 0xC0000005: Access violation reading location 0xfeeefeee.
First-chance exception at 0x77e9bca3 in game.exe: 0xC0000005: Access violation reading location 0xfeeefeee.
OutputDebugString faulted during output
First-chance exception at 0x10032d55 (util.dll) in game.exe: 0xC0000005: Access violation reading location 0xfeeefee2.
Unhandled exception at 0x10032d55 (util.dll) in game.exe: 0xC0000005: Access violation reading location 0xfeeefee2.
game.exe is the application.
edit: string
is std::string
Programmers are lazy people, they keep trying to find a way of doing so many things without moving.Current project: A puzzle game. Homework.
% completed: ~10%. ~80%
Status: Active. Active. [edited by - alnite on May 17, 2003 3:12:06 PM]