Earlier quoted context omitted.
how would you iterate over every possible value of a unsigned int?
The unary complement operator should get you there: unsigned int x = 0; const unsigned int max = ~x; while (x Or, #include const unsigned int max = UINT_MAX;
while (1) {
calc(x++);
}
which is an infinite loop, since the expression x is always true