What is easiest and best way to validate that entry of 4 characters or less contain only integers?
I use a character array along with fgets; digits are easy to test using isdigit, and if it's a valid number, it's easy to convert to an integer.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I use a character array along with fgets; digits are easy to test using isdigit, and if it's a valid number, it's easy to convert to an integer.