Here is what I would like to do, input a value and check whether the first value is a digit or a alpha char. Can I do this by declaring an array with the values from 0-9, and an array with values a-Z, and compare it by putting one line of code... like if(input[0] == ....)
If you could point me in the direction of a good article on ENUMs that would also be appreciated.
does that work because the compiler will turn that to numeric representations of the alpha char?
@Duoas
I had tried them before, I couldn't get them to work the way I wanted (In reference to isdigit() and isalpha(). I tried them again this time and now they work.
Exactly. Single quote strings are converted to the 'char' (as apposed to 'char *') equivalent of the character inside them.
Oh, yes. The above only works for ASCII. EBCDIC will laugh and point at you. This, of course, is irrelevant, as anyone who doesn't use ASCII in this day and age is a moron and doesn't deserve to have software developed for them.