C++ "friend" related
-
Hi , supposing that I have two classes : A and B . I declare a nested class in B called C. class A { /// } class B { /// class C { /// } ; } what is the problem : I want that the C class to be a friend of the A class. I can't write in the def. of class A friend class B::C , because B is not defined .Even if I define the B class before the A def. it's no good . I can't move the code of the B class declaration before the delcaration of A ( some other classes are between them ) . So , what can I do ? :)
-
Hi , supposing that I have two classes : A and B . I declare a nested class in B called C. class A { /// } class B { /// class C { /// } ; } what is the problem : I want that the C class to be a friend of the A class. I can't write in the def. of class A friend class B::C , because B is not defined .Even if I define the B class before the A def. it's no good . I can't move the code of the B class declaration before the delcaration of A ( some other classes are between them ) . So , what can I do ? :)