First of all I am new to C++.
I have created a class, lets say class A. When the constructor is called I create two new classes Class B and Class C, then are not the same class as A.
I need to get data from class B into Class C. How should I go about this? I though I could make a function in class A that returns the data, but how do I get a pointer of Class A into Class B so I can access the data from class A Since Class B is created during the constructor their is no way of passing a pointer of Class A to it.
I have created a class, lets say class A. When the constructor is called I create two new classes Class B and Class C, then are not the same class as A.
I need to get data from class B into Class C. How should I go about this? I though I could make a function in class A that returns the data, but how do I get a pointer of Class A into Class B so I can access the data from class A Since Class B is created during the constructor their is no way of passing a pointer of Class A to it.
Comment