Why do we pass a reference for copy constructors?
 If it does shallow copy for pass by value (user defined object), how
will it do the deep copy?


Ans:- if we don't pass the reference, every time a new object copy
like

A a=b;

constructor will be called twice ,,

correct me if i'm wrong...

help me regarding about shallow copy and deep copy  in copy
constructor.........

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to