Increment
Two operators: prefix increment & postfix increment
// prefix incrementMyTime& operator++(){this->minutes++;this->hours += this->minutes / 60;this->minutes = this->minutes % 60;return *this;}// postfix incrementMyTime operator++(int){MyTime old = *this; // keep the old valueoperator++(); // prefix incrementreturn old;}
C++中可以重载的运算符
