how would i make an if statement that would find if the number nuber entered by the user was actually a number or not...
i.e.
if (myNum != char) i know that doesnt work but its to get an idea of what im trying to do
thanks
Printable View
how would i make an if statement that would find if the number nuber entered by the user was actually a number or not...
i.e.
if (myNum != char) i know that doesnt work but its to get an idea of what im trying to do
thanks
ctype.h has a bunch of macros
In VC help look up isalpha() and isdigit() or ctype
You can use either these two macros to find out if a user-entered string is numeric or not.
can you give me an example????