Why use ++i instead of i++ in cases where the value is not used anywhere else in the statement?
Look at possible implementations of the two operators in own code: // Pre-increment T*& operator ++() { // Perform increment operation. return *this; } // Post-increment T operator ++(int) { T copy = *this; ++*this; return copy; } The postfix operator invokes the prefix operator to perform its own operation: by design and in principle … Read more