A problem with my class destructor...

Started by
0 comments, last by neurokaotix 21 years ago
In my log class I am now getting this error: "CLog.cpp(36) : error C2600: ''CLog::~CLog'' : cannot define a compiler-generated special member function (must be declared in the class first)" Here is my class code (CLog.h):
  
class __declspec(dllexport) CLog
{
private:
	FILE*	logfile;
	int		lineCount;
	int		lineLimit;
	char*	lineData[255];
	va_list arg[255];

	CEngine * Engine;

public:
	
	CLog(CEngine *);

	bool screenOutput;
	bool Output(char* string, ...);
	void OutputScreen(char* string, va_list arg_list);
	void ResetScreen();

	bool Init();
	bool Shutdown();

	CLog();

};
  
And here is my code for the destructor (CLog.cpp):
  
CLog::~CLog()
{
	Shutdown();
};
  
I can''t seem to figure out what the problem is... anyone have an idea? Join the World Wide Revolution:
Advertisement
you have to declare the destructor in your .h file first. You''ve declared 2 constructors but no destructor.
GSACP: GameDev Society Against Crap PostingTo join: Put these lines in your signature and don't post crap!

This topic is closed to new replies.

Advertisement