Hi guys, like the title says, how do you handle two classes (and one of them is a singleton) that references one another? I've got these currently:

singleton_A.h:
Code:
#include "class_A.h"

class ClassA; // Forward Declaration

class SingletonA
{
    ...... //The usual singleton routines
    ClassA* mA;
}
class_A.h:
Code:
#include "class_B.h"
#include "singleton_A.h"

class ClassA : public ClassB
{
  ....
}
FYI, there's a lot of SingletonA::getInstance()... inside of both ClassA and ClassB.

The problem with this is the ClassB cannot be compiled because apparently ClassB, while being the parent of ClassA, also calls the singleton (which in turn has ClassA as its member). I know that this is probably just an issue of bad design. But then again how do I solve this?

The requirements are:
1. ClassA and ClassB both calls a function from SingletonA
2. SingletonA needs some data from ClassA that are required to process the output for the functions that are called by ClassA and ClassB.

Can anybody help me please? I'm so lost right now. Thanks in advance.