C++ implicit copy constructor for a class that contains other objects
Foo f1; Foo f2(f1); Yes this will do what you expect it to: The f2 copy constructor Foo::Foo(Foo const&) is called. This copy constructs its base class and then each member (recursively) If you define a class like this: class X: public Y { private: int m_a; char* m_b; Z m_c; }; The following methods … Read more