so I have
I want to use pC to call the draw() function in A.Code:class A{ public: draw(){ cout<<"hello"; } } class B{ A* pA; friend class C; } class C{ B* pB; }
I used this pB->pA->draw(); but it doesnt seem to work.
Did I call it correctly?
so I have
I want to use pC to call the draw() function in A.Code:class A{ public: draw(){ cout<<"hello"; } } class B{ A* pA; friend class C; } class C{ B* pB; }
I used this pB->pA->draw(); but it doesnt seem to work.
Did I call it correctly?
Last edited by byebyebyezzz; 12-06-2011 at 05:41 PM.
This is a very vague statement. Computers aren't vague - and if you want help using them, you can't be either. Please post the specific error message you get, or the specific behaviour that you (i) get and (ii) expect to get.but it doesnt seem to work.