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
I am new to c++, my answer might be realy stupid but, i do this for this kind of reverse loops;
size_t count = 3;
size_t newCount = 0;
if (count > 0)
for (size_t i = count - 1; i >= newCount; i--)
{
//do your work here
//and at the end
if (i == 0)
break;
}
and it works. since "i--" part at the loop executed at the next step, break should work allright. what do you think is this way safe ?