Computer Science, asked by prettymuch754, 8 months ago

Explain the copy constructor with the help of example.

Answers

Answered by Riyasangma
0

Answer:

A copy constructor is a member function which initializes an object using another object of the same class.

example:using namespace std ;

class point

{

private :

int x, y:

public :

Point ( int x1 , int y1 ) {x =x1 = y1;}

Similar questions