I have a nested class structure, Class A is parent and Class B is nested under. When I compile the code, the copy constructor of Class A reports that there is no default constructor for the class B.
error: no default constructor exists for class "A::B"
class A{
-------
struct B{
B(var1, var2){}
};
B b;
};
A::A(){ b = new B(Var1, Var2) } // default constructor
A::A(a){ } // copy constructor
Any ideas on how to fix this ?