Thread: Testing for ASCII values?

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    22

    Testing for ASCII values?

    I am looking for a function that would ONLY allow the user to enter integers (0-9) ascii values 48-57. I have looked everywhere I know and even asked some other friends of mine but no one has any idea. If someone can offer any kind of help, I would greatly appreciate it. I have not started on the function because I do not know where to start.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    isdigit - in ctype.h

    This is for reading single characters '0' to '9', not whole numbers like 12345

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. disposing error
    By dropper166 in forum C# Programming
    Replies: 2
    Last Post: 03-30-2009, 11:53 PM
  2. Replies: 2
    Last Post: 11-19-2008, 02:36 PM
  3. Struct Values
    By Muphin in forum C++ Programming
    Replies: 5
    Last Post: 08-13-2005, 09:24 PM
  4. need some advice on displaying values
    By rEtard in forum Windows Programming
    Replies: 7
    Last Post: 06-16-2005, 09:55 AM
  5. Computing Large Values
    By swbluto in forum C++ Programming
    Replies: 8
    Last Post: 04-07-2005, 03:04 AM