alphanumaric and numeric checking
-
right now i am in a c++ class and even though the questions don't require validation i still lose points on my work i submit, i need to cover my bases here, can anyone help me find a way to reject alphanumeric values and accept only numeric ones? thanks to anyone who can help.
-
right now i am in a c++ class and even though the questions don't require validation i still lose points on my work i submit, i need to cover my bases here, can anyone help me find a way to reject alphanumeric values and accept only numeric ones? thanks to anyone who can help.
You can check if a character is a digit either using the isdigit[^] function or by checking if its ASCII value is between 48 and 57.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
You can check if a character is a digit either using the isdigit[^] function or by checking if its ASCII value is between 48 and 57.
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++)thank you, this look easy to implement into my programs.