mercredi 28 janvier 2015

Complex Circular Dependency among classes

I have 5 classes (A,B,C,D,E), each of which will have their own class and header files.



class A{};
class B
{
B(A&a);
};
class C
{
C(B&b);
};
class D:public A
{};
class E:public D
{
vector<C*> vc;
};


Forward declaration will not work because I also have a lot of sharepointers being used in each of those classes.


Aucun commentaire:

Enregistrer un commentaire