I am having a cyclic dependency issue. I have two header files and they each depend on each other. The issue I am having has to do with a class in a namespace.
File #1
class Player; // This is how I forward declare another class
namespace sef {
class Base
{
public:
Player a;
bool SendEvent(int eventType);
};
class Sub: public Base
{
protected:
Player b;
bool Execute(string a);
};
}
File #2
//class sef::Sub; // I am having trouble compiling this
class Player
{
public:
sef::Sub* engine; // I am having trouble compiling this
};
How do I forward declare the sef::Sub class in file #2?