Results 1 to 2 of 2

Thread: Only numeric

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    California
    Posts
    25

    Only numeric

    Please be patient with this student who does not know the answer to this simple question

    I have a program prompting the user for a numeric input between a range of numbers.

    I figured out how to test the number but need to know how to limit entry to numeric numbers only!

    Or test the entry to see if is non-numeric (alpha characters)

    HELP!!

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    There's a function called isalpha() which will check if a character is alphabetic. There's another one called isalnum() which will check if a character is alphanumeric.

    I think they're in ctype.h.
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width