Is the following going to work as expected on all platforms, sizes of int, etc? Or is there a more accepted way of doing it? (I made the following up.)
#define MAX_NON_NEGATIVE_INT ((int)(((unsigned int)-1) / 2))
I won't insult your intelligence by explaining what it's doing!
Edit: I should have mentioned that I cannot use any standard classes, because I'm running without the C runtime.