skip to main
|
skip to sidebar
C++ exercises
Why does a copy constructor accept a const reference as parameter?
Because otherwise an infinite call chain would be created. i.e., a copy constructor has to call itself to make a copy of the argument.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Labels
copy constructor
(4)
constructor
(2)
destructor
(2)
inheritance
(2)
structure
(2)
RTTI
(1)
abstraction
(1)
access control
(1)
assignment operator
(1)
inline
(1)
macro
(1)
new
(1)
overload
(1)
override
(1)
polymorphism
(1)
storage class
(1)
virtual function
(1)
Sister sites
algorithm exercises
Resources
c cheat sheet
Blog Archive
March
(1)
January
(31)
No comments:
Post a Comment