Results 1 to 4 of 4

Thread: notANumber in C? how?

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2001
    Location
    Ottawa, Canada
    Posts
    181

    notANumber in C? how?

    i've done VB programming, and java, but i'm new to C, and i was wondering how i would be able to read a valid input.

    if the user inputs an invalid number, how do i check for that? java there is a command called notANumber returns a boolean, (or something very similar)...is there an equivalent in c?


    also is there a way to check if the int entered is too large? i'm trying to do something using "sizeof()", but not sure what i can do with it...
    any other functions or expressions i could use?



    i'm trying to stay away from trying and catching exceptions...
    thanx in advance

    --770
    Last edited by delta770; Feb 2nd, 2003 at 08:46 PM.

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