Hi sorry for a new bee question. I have the following code but there
is something that i can not understand what does it do.
Can you please tell me what does "Point &operator=( Point p)" does?
I think that the a overwrite the = operator but should it return bool
instead of Point??
Thanks a lot in advance.
Best regard
class Point {
public:
double x;
double y;
double z;
double thickness;
Point(double xx=0,double yy=0,double zz=0,double tn=0){
x=xx;
y=yy;
z=zz;
thickness=tn;
}
Point(const Point& obj){
x=obj.x;
y=obj.y;
z=obj.z;
thickness=obj.thickness;
}
Point &operator=( Point p) { // Right side is the argument.
x=p.x;
y=p.y;
z=p.z;
thickness=p.thickness;
}
};