CS202 Copy Constructors
10
Copy Constructors
•
Using the reference operator instead, we change the
function to be: (the function
call
remains the same)
•
•
name &function(name &obj) {
•
cout <<obj.get_name() <<endl;
•
return (obj);
•
}
•