•Copy constructors are also used whenever passing an object of a class by value: (get_name returns a ptr to a char for the current object)
•
• name smith("Sue Smith");
//constructor with arg used
•
• //call function by value & display from
object returned
• cout <<function(smith).get_name()
<<endl;
•
•name
function(name obj) {
• cout <<obj.get_name()
<<endl;
•