i++ is known as a post-increment. That means it saves the initial value, increments it, then returns the initial value. By comparison, ++i simply increments the value and returns it. This is why the pre-increment is preferred when using iterators, since it potentially avoids a copy.
Based on that description you can probably figure out what that code does. Of course, you could also figure out what it does based on the fact that it doesn't corrupt the stack which it would if it was starting at index 1.
|