下面代码中position -= 1;这句是什么意思,减1怎么实现的?跟operator的关系?
哪位大神来讲解一下,非常感谢!
Point position = getposition();
position -= 1;
class Point {
public:
Point operator+(Point 2nd);
void operator+=(Point 2nd);
void operator-=(Point 2nd);
Point (int x,int y);
virtual ~Point();
int x;
int y;
};