I want the iterator variable in a for loop to reverse iterate to 0 as an unsigned int, and I cannot think of a similar comparison to i > -1, as
unsigned int
i > -1
I would use two variables:
unsigned int start = 10; for (unsigned int j = 0, i = start; j <= start; ++ j, -- i) { // ... }
You can also use a while loop:
unsigned int start = 10; unsigned int i = start + 1; while (i --) { // ... }