Hi guys, I am bit puzzled with a requirement on my program:
Say I have a class A with some private variables
class A
{
private:
string variabe;
};
Then I have class b with some other private variables
class B
{
string varialb1;
};
Now I have a class C with a pointer type class C that should be initialized in the constructor by using object of class A. So
class C
{
private:
A a;
};
C *pointer = &a; //this does not work
So how can I initiliaze *c with object of A?
Thank you.