hi all, i've completed this c++ project, except for one small tidbit. my program asks for a number, and i need to figure out how to check if it really is a number. for example, if the user enters f, the program has to say "not a valid input" or whatever, and ask for the number again. i know how to do everything except the number check. how do i check if something isn't a number or not? btw, my school uses the default C++ compiler that comes with Visual C++ 2008 express free. thanks!
Question
Timmah339
hi all, i've completed this c++ project, except for one small tidbit. my program asks for a number, and i need to figure out how to check if it really is a number. for example, if the user enters f, the program has to say "not a valid input" or whatever, and ask for the number again. i know how to do everything except the number check. how do i check if something isn't a number or not? btw, my school uses the default C++ compiler that comes with Visual C++ 2008 express free. thanks!
Link to comment
Share on other sites
8 answers to this question
Recommended Posts