const Point& and const Point are same
if the Prototype is
Code:
Point operator-=(const Point);
andFunction declearation is
Code:
Point Point::operator-=(const Point pt){
this->x -= pt.x;
this->y -= pt.y;
return *this;
}
then I can Use it in this way
-----------------
But when
Code:
Point operator-=(const Point&);
andFunction declearation is
Code:
Point Point::operator-=(const Point& pt){
this->x -= pt.x;
this->y -= pt.y;
return *this;
}
then ALSO I can use it in this wayWHY ??
Isnt there any difference between that Point& ??