M
me.devilspride
Hi,
I have two classes A and B as follows.
A has member data X and member functions P, Q, R. All P,Q,R access X
and Q calls P.
B is a derived class of another Class(which I don't go into) with
member functions D, E.
P in A calls D in B.
D in B calls Q, R in A.
It's a big recursion. Everything works if I move D,E to class A. But
how do I achieve above as value of X need to be used through the whole
program execution? I wanted to know if what I am trying to accomplish
is something doable or I need to redesign my class structures.
Thanks
I have two classes A and B as follows.
A has member data X and member functions P, Q, R. All P,Q,R access X
and Q calls P.
B is a derived class of another Class(which I don't go into) with
member functions D, E.
P in A calls D in B.
D in B calls Q, R in A.
It's a big recursion. Everything works if I move D,E to class A. But
how do I achieve above as value of X need to be used through the whole
program execution? I wanted to know if what I am trying to accomplish
is something doable or I need to redesign my class structures.
Thanks