Assuming Point is a class type with a public copy constructor, iden¬tify each use of the copy constructor in this program fragment:
Point global;
Point foo_bar(Point arg)
{
Point local = arg;
Point *heap = new Point(global);
*heap = local;
Point pa[ 4 ] = { local, *heap };
return *heap;
______________________________...
Define an Employee class that contains the employee's name and a unique employee identifier. Give the class a default constructor and a constructor that takes a string representing the employee's name. If the class needs a copy construc¬tor or assignment operator, implement those functions as well.
Please send me short explaination of my C++ program.....?
You are you using a a pointer and an array while passing a variable to a function called Point. I'm not quite sure what you are trying to point to, but you are copying the heap.
floral
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment