Char type

Is there a way to test if a value is an integer or character. Basically, I need to read a data file and if the first value is a char type i need to do one thing and if its not i need to do another. I just can't figure out how to test for that.
I think what you might be looking for are ASCII values. Each char has a corresponding decimal value associated with it. For example, NULL is \0

I just did a quick Google search and found this website: http://www.asciitable.com/

If you can figure out what ASCII value your data has, you can determine if it's a number (range 48-57) or a letter (range 65-90 for uppercase, range 97-122 for lowercase)
I would use isalpha or isdigit.
Topic archived. No new replies allowed.