I am overloading += operator in this way
and this is my Copy ConstructorCode:Point Point::operator+=(const Point& pt){ int tmp_x =this->x + pt.x; int tmp_y =this->y + pt.y; return Point(tmp_x, tmp_y); }Why teh Operator Is not getting Overloaded ??Code:Point::Point(const Point& pt){ *this = pt; }
I know making x += pt.x or this->x += pr.x Works. I wanna Know Why it doesnt Work ??