This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
It seems you are trying to get the int i to increment, The issue you are running into is your are using a postfix operator in an expression.
When you use a postfix operator in an expression such as ( i = i++;). The returned value is the value prior to the postfix operation.
The post and prefix operators i++, ++i, essentially translate to i = i +1;
value of i:3
Hope this helps, if not clear please let me know.
(Sorry about the formatting on the code posting, for some reason the code formatting tag isnt working at the moment).
[ UD: The "Disable BB Code in this message" box was checked. ]