Copy Constructor is called when an object is either passed by value, returned by value, or explicitly copied . If there is no copy constructor, c++ creates a default copy constructor which makes a shallow copy.
Copy Constructor is called when an object is either passed by value, returned by value, or explicitly copied . If there is no copy constructor, c++ creates a default copy constructor which makes a shallow copy.