| |
GeekInterview.com > Interview Questions > Programming > C++
| Print | |
Question: what is difference between copy constructor and constructor?
|
| August 08, 2006 13:12:14 |
#2 |
| Anurag Verma |
Member Since: Visitor Total Comments: N/A |
RE: what is difference between copy constructor and co... |
| Constructor is called when an object is created.Copy constructor is called when the copy of an object is made. For e.g. passing parameter to function by value, function returning by value. Copy constructor takes the parameter as const reference to the object. |
| |
Back To Question | |