Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Integer Validation

wfreds23wfreds23 USAMember Posts: 0

What is easiest and best way to validate that entry of 4 characters or less contain only integers?


  • pseudocoderpseudocoder Member Posts: 701 ✭✭✭

    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.

Sign In or Register to comment.