Copy constructor vs Assignment operator

Copy constructor is called when a new object is created from an existing object, as a copy of the existing object.

Assignment operator is called when an already initialized object is assigned a new value from another existing object.

Advertisements