OK, I have got to a point where I can have an instance of a class in the .cpp file for a unit, but not in the header! For example this is fine:
Code:
// ------------------------------
// CEntity.h
#include "CList.h"
class CEntity
{
void func ();
};
// ------------------------------
// CEntity.cpp
#include "CEntity.h"
void CEntity :: func ()
{
CList *List;
}
// ------------------------------
This gives an error:
Code:
// ------------------------------
// CEntity.h
#include "CList.h"
class CEntity
{
void func ();
};
void CEntity :: func ()
{
CList *List;
}
// ------------------------------
The problem is that I have some members of the class that are CList type, so they have to go somewhere in the header.