区分increment/decrement
class UPInt{
public:
UPInt& operator++{
*this += 1;
return *this;
}
const UPInt operator++(int){
UPInt old = *this;
++(*this);
return old;
}
}
区分increment/decrement
class UPInt{
public:
UPInt& operator++{
*this += 1;
return *this;
}
const UPInt operator++(int){
UPInt old = *this;
++(*this);
return old;
}
}