I have this code that works fine for regular signed integers that I am trying to write an equivalent version that will work with size_t (as in that as of now start and count are ints and i need them to be size_t) :
int count,start;
for (start = (count-2)/2; start >=0; start--)
{
someFunction( x, start, count); // x is to illustrate function has other parameters
}
I feel like this code is straight forward enough for a really simple solution but I am drawing a blank.
You could rewrite it like this:
Otherwise, the only other option I can think of is to do some non-standard compliant casting between signed and unsigned… or to do something with
~(size_t)0…Here are some non-standard compliant alternatives: