// 前置++
Point& Point::operator++() {
++_x;
++_y;
return *this;
}
// 后置++
Point Point::operator++(int) {
Point tmp = *this;
++(*this);
return tmp;
}
// 前置--
Point& Point::operator--() {
--_x;
--_y;
return *this;
}
// 后置--
Point Point::operator--(int) {
Point tmp = *this;
--(*this);
return tmp;
}
不知道你这个问题是否已经解决, 如果还没有解决的话: