What is a copy constructor? A constructor that allows a user to move data from one object to another A constructor to initialize an object with the values of another object A constructor to check the whether to objects are equal or n 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; }
};