If i have three classes A, B and C
I can create a pointer in class A that can access classes B and C however is it possible for classes B and C to then look back at class A?Code:class A { private: B b; C c; };
and is it possible for classes B and C to access each others variables and functions?
I have got around this problem in the past by just making the class a function in side the class it needs to share information with however this is making class A bigger then it should be and causing other sorts of problems, what I am trying to do maybe bad coding practice so any suggestions on a way around this problem is greatly welcome.



LinkBack URL
About LinkBacks


