Explain the main difference between a default constructor and a copy constructor. If we are working with class X, show the prototypes for both the default constructor and copy constructor. code example
Example: create copy constructor c++
// Copy constructor
Point(const Point &p2) {x = p2.x; y = p2.y; }
int getX() { return x; }
int getY() { return y; }
};