R
Rahul
Hi Everyone,
It is well known that the input parameter which is passed to the
copy constructor is passed as reference and not as as object. Because
passing an object is as good as making another copy which in itself
needs a copy constructor.
However i was wondering why can't the existing object be passed as
a pointer instead of a reference to the copy constructor which creates
a new object.
Thanks in advance!!!
It is well known that the input parameter which is passed to the
copy constructor is passed as reference and not as as object. Because
passing an object is as good as making another copy which in itself
needs a copy constructor.
However i was wondering why can't the existing object be passed as
a pointer instead of a reference to the copy constructor which creates
a new object.
Thanks in advance!!!