Why do we put & in copy constructor?
I am a c++ newbie and i want to know that why do we need to put & in the
copy constructor in c++ class.I understand that using ampersand provides
the reference of the object to be copied and a new copy of the object is
not created.But why am i not allowed to copy the object (ignoring the
memory usage point)?
No comments:
Post a Comment