<code>
class CPoint3d
{public:
int x;
int y;
CPoint3d(const CPoint3d &pt);
CPoint3d(int cx, int cy);
}
CPoint3d::CPoint3d(const CPoint3d& pt)
{
this->x = pt.x;
this->y = pt.y;
}
CPoint3d(int cx, int cy)
{x=cx;
y=cy;
}
int main()
{CPoint3d one(2,3);
CPoint3d two(&one);
cout<<one.x<<endl<<one.y<<endl
<<two.x<<endl<<two.y<<endl;
return 0:
}
</code>
Is it really necessary to include the this->variable in this copy constructor?