Thread: checking string if number or not

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User wintellect's Avatar
    Join Date
    Mar 2006
    Posts
    24
    Personally, I would have your function return 0 when the char is a digit and -1 on error

    ...but this is probablyon a personal thing

  2. #2
    Been here, done that.
    Join Date
    May 2003
    Posts
    1,164
    Quote Originally Posted by wintellect
    Personally, I would have your function return 0 when the char is a digit and -1 on error

    ...but this is probablyon a personal thing
    Why would you do something like that? It's contrary to every other istype function (and C/C++ standards). Any idea what FALSE equates to?
    Definition: Politics -- Latin, from
    poly meaning many and
    tics meaning blood sucking parasites
    -- Tom Smothers

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 10:13 AM
  2. Replies: 8
    Last Post: 04-25-2008, 02:45 PM
  3. Message class ** Need help befor 12am tonight**
    By TransformedBG in forum C++ Programming
    Replies: 1
    Last Post: 11-29-2006, 11:03 PM
  4. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  5. Program using classes - keeps crashing
    By webren in forum C++ Programming
    Replies: 4
    Last Post: 09-16-2005, 03:58 PM