Sunday, September 2, 2012

Copy Constructor

http://www.velocityreviews.com/forums/t283016-question-on-copy-constructor.html as to why the argument of the copy constructor needs to be pass-by-reference

(note that there are 2 ways of passing arguments in C++, one is by value (copy constructor is involved), and one is by reference)

See Wikipedia for examples

No comments:

Post a Comment