in copy constructor you have to pass the object of same class...((mandatory));
please check the example of copy constructor.
class sample
{
int a;
public:
sample()
{
a = 10;
}
sample(&obj)
{
a = obj.a;
}
void show()
{
cout<<a;
}
};
main()
{
sample o1,o2;
o1.show();
o2.show();
}
in both it will print 10 on output screen;