Help for a problem

Joined
Jun 5, 2007
Messages
2
Reaction score
0
Hello,

i need a solution for my problem. Lets say that we have 2 classes, class A and class B. For class A we have method A and method C. For class B we have method B. Method A calls method B and then method B is calling method C (from class A). The problem is how can classes know each other (pointers maybe???)?
Any help will be appreciated!

Code:
class A {
     public:
     void method_A (void){???->method_B(args);}
     void method_C (args){....};
};

class B {
    public:
    void method_B (args){......;????->method_C(args);}
}

main(){
A *instA;
B *instB;

instA->method_A;
...
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top