![]() |
Difference between copy constructor and assignment operator? |
[Edit] |
[Edit]
The copy constructor is used to initialize a new instance from an old
instance, and is called when passing variables by value into functions
or as return values out of functions.
The assignment operator is used to change an existing instance to have
the same values as the rvalue, which means that the instance has to be
destroyed and re-initialized if it has internal dynamic memory.
First answer by ID3343092378. Last edit by ID3343092378. Question popularity: 12 [recommend question]
|
Research your answer: |
Can you answer other
questions about programming?
- How can you learn all the codes of a programming language?
- For beginners Suggest a good reference book to learn C Sharp VB Net ADO Net ASP Net for Ms Developer Studio 2005 also suggest books for ASP VB Script Java Script Java Core Java and VB 6.0?
- What software do you need for creating a kernel and an OS?




