is there a way to check if an inputed value is a letter or number? because i have this program that needs a user to type in a bunch of numbers (0-9) and if you put in a number ever, it automaticly fills everyone with a zero. i tried this:
but it didnt work.Code:if(x != 1 && x != 2 && x != 3.... && x != 9) { cout <<"That's not a valid number"; b--; //b is used to count how many ints the have put in, dont want it to think that it was a valid value }
thanks in advance for any help!