Difference between i++ and ++i in a for loop

c, c++, for-loop

Solution

Nothing at all. The increment is a lone statement, so whether it is pre-incremented or post-incremented doesn't matter.

Problem

Possible Duplicates: Incrementing in C++ - When to use x++ or ++x? What is the difference between ``` for (int i = 0; i < MAX; i++) { //...do something } ``` and ``` for (int i = 0; i < MAX; ++i) { //...do something } ``` ?

Original source

Related problems