class A{}
class B{
A obj1; // class B contains an object of the class A
public:
void GetAddressForA (A*&xxx); // ('a reference on a pointer to
// objects of the class A' - Is a parameter like that possible?' -
// IF YES - what is the correct syntax? 'Class*&xxx' looks too
// weird IMO)
}
Definition of that mysterious function:
void GetAddressForA(A* &xxx){
xxx = &obj1;
}
Somewhere in the program we define this:
A* yyy; // A variable designed to store an address of any object
// of the class A
B kkk; // Also one object of class B;
Then we call:
kkk.GetAddressForA (yyy);
My question:
Will yyy contain the address of kkk.obj1 after a call to the function?
Thx for help