How to overload the operator++ in two different ways for postfix a++ and prefix ++a?
Should look like this: class Number { public: Number& operator++ () // prefix ++ { // Do work on this. (increment your object here) return *this; } // You want to make the ++ operator work like the standard operators // The simple way to do this is to implement postfix in terms of prefix. … Read more