is there any way to disable the warnings by something like -Wno? I know they say you shouldn't use null in arithmetic anyway, but I'm just using it as a quick fix, and it bugs me that i'm getting like 7 warnings for it and not any other errors or warnings.
Basically what it does is allows the user to prompt either a string of chars, or single digits. So both chars and ints are used. But I need to evaluate if the user entered a string of more than 1 character, if so then it is assumed that it is not a digit.
You don't really need NULL for this. NULL is typically used for pointers, but it really is just a macro for 0. Using NULL here, while not incorrect, just feels out of place.
Just use zero.
And, by the way,
1 2 3 4 5 6 7
if (a==0)
//equivalent:
if (!a)
if (a!=0)
//equivalent:
if (a)