Results 1 to 3 of 3

Thread: if statement....

  1. #1
    t420h
    Guest

    if statement....

    how would i make an if statement that would find if the number nuber entered by the user was actually a number or not...

    i.e.

    if (myNum != char) i know that doesnt work but its to get an idea of what im trying to do


    thanks

  2. #2
    jim mcnamara
    Guest
    ctype.h has a bunch of macros

    In VC help look up isalpha() and isdigit() or ctype

    You can use either these two macros to find out if a user-entered string is numeric or not.

  3. #3
    t420h
    Guest

    can you give me an example

    can you give me an example????

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