Copying vs assignment

suggest change

Syntax

These are assignment operators, not constructors. The usual copy assignment operator returns MyClass&. Returning by value or by const reference is allowed, but it changes how the result of an assignment can be used.

Remarks

Other Good Resources for further research :

Assignment operator

Copy constructor

Copy constructor vs copy assignment

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents