First page Back Continue Last page Graphics
copy constructor
Used during initialization not during ordinary assignment.
Prototype
- Class_name ( const Class_name & ) ;
When it's used (given motto as a
StringBad object)
- StringBad ditto(motto);
- StringBad metoo = motto; (old fashioned init)
- StringBad also = StringBad(motto);
- StringBad * pStringBad = new StringBad(motto);
Also, when passing by value.