Thread: Function to check whether user has entered a number or not?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    18

    Question Function to check whether user has entered a number or not?

    I want to be able to check if the user has entered "two" or even gibberish as one of the number inputs.

    What i have so far checks whether each input = 0. If it does it confirms that with the user before continuing. Is there a function that can check whether a string has anything else but a number?

    Thanks in advance,

    Jez
    Last edited by JezW; 04-12-2009 at 09:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. xor linked list
    By adramalech in forum C Programming
    Replies: 23
    Last Post: 10-14-2008, 10:13 AM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. writing/reading from file produces double results.
    By stumon in forum C Programming
    Replies: 4
    Last Post: 03-20-2003, 04:01 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM