That is correct. i++ is a post increment operator. I.e. it increments after the assignment. If you use ++i it should work.
Anyway, you probably meant i++, instead of the unusual i = i++; ?
What would be the reasoning behind using i=i++ as opposed to just i++? For pointers I understand the difference, but I’m lost as far as regular variables go.