D
Dariusz Plygawko
Welcome,
I will simplyfy my problem...
There are 3 classes in 3 files(actually 6, *.h and *.cpp). Every class uses
2 others.
These are *.h:
--------------------
....
include <B.h>
include <C.h>
....
class A
{
B b;
C c;
....
}
--------------------
....
include <A.h>
include <C.h>
class B
{
A a;
C c;
....
}
--------------------
....
include <A.h>
include <B.h>
class C
{
A a;
B b;
....
}
Why it dosn't compile? Unless I put before each class declaration of others:
class B;
class C;
etc...
Is it only solution?
Thanks,
Dariusz
I will simplyfy my problem...
There are 3 classes in 3 files(actually 6, *.h and *.cpp). Every class uses
2 others.
These are *.h:
--------------------
....
include <B.h>
include <C.h>
....
class A
{
B b;
C c;
....
}
--------------------
....
include <A.h>
include <C.h>
class B
{
A a;
C c;
....
}
--------------------
....
include <A.h>
include <B.h>
class C
{
A a;
B b;
....
}
Why it dosn't compile? Unless I put before each class declaration of others:
class B;
class C;
etc...
Is it only solution?
Thanks,
Dariusz