DerStephan
Programmer
Hi,
i have a little problem...
I have 2 classes in seperate cpp files with header files. Maybee classA and classB
classB carries an instance of classA
...
class classB
{
public:
classA memCA;
}
...
now what I want is a pointer on classB in classA
class classA
{
public:
classB* mempCB;
}
...
now the funny problem with the including of each others headerfile... I have in each haeder something like
#include "classB.h"
#ifndef _classA
#define _classA
class classA
...
#endif
and for classB the other way around.
I don't know what to do to prevent this all from rekursive including, this problem drives me crazy.
Any suggestions?
Thanks in advance
Stephan
PS: I really need to have this pointer...
i have a little problem...
I have 2 classes in seperate cpp files with header files. Maybee classA and classB
classB carries an instance of classA
...
class classB
{
public:
classA memCA;
}
...
now what I want is a pointer on classB in classA
class classA
{
public:
classB* mempCB;
}
...
now the funny problem with the including of each others headerfile... I have in each haeder something like
#include "classB.h"
#ifndef _classA
#define _classA
class classA
...
#endif
and for classB the other way around.
I don't know what to do to prevent this all from rekursive including, this problem drives me crazy.
Any suggestions?
Thanks in advance
Stephan
PS: I really need to have this pointer...