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!
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;
...
}