"Michael Sgier" <sg***@nospam.ch> wrote in message
news:43**********************@news.sunrise.ch
Maybe like this it's clearer. My simpengine.h:
class CSimpEngine : public CEngine
{
public:
CSimpEngine()
{
gameCamera = new CCamera;
}
~CSimpEngine()
{
delete gameCamera;
gameCamera = NULL;
}
};
This is completely useless. Read what John Harrison wrote.
1. Simplify the code as far as you can while still getting the error.
2. Then supply us with the EXACT and COMPLETE code from 1. that you run
through the compiler.
Since you appear to have some psychological resistance to doing what is
necessary, let me make two points.
First, you don't know what the problem is otherwise you wouldn't be posting
here. That means that you don't know where in your code the problem is and
hence your attempts to select relevant code are very likely to fail.
Second, your attempts to select relevant code have in fact failed. Consider
the following code, which consists of everything you have posted, plus a few
other details that I have filled in. It compiles without any errors. Thus
the problem is not in the code you have posted. Don't waste any more time
supplying selected excerpts.
#include <cstdlib>
class CEngine
{
public:
CEngine() {}
~CEngine() {}
};
class CCamera
{};
class CSimpEngine : public CEngine
{
public:
CSimpEngine()
{
gameCamera = new CCamera;
}
~CSimpEngine()
{
delete gameCamera;
gameCamera = NULL;
}
private:
CCamera *gameCamera;
};
int main()
{
CSimpEngine* MyCSimpEngine = new CSimpEngine;
return 0;
}
--
John Carson