Thread: array validation

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    42

    array validation

    Hi,
    I was looking for an easy way to do the validation of my array. It must just be numbers else, int validation will = 0.

    Code:
       int validation
       char numbers[9]
       puts("enter your numbers : ");
      gets(numbers);
    
      //like I said, I need to do a test that will tell me if one of my input is  not a number
    My program now works (except this little validation), thanks for all of you who helped me, you've made me a better C newbie.
    By the way, I know I should not use gets

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read the FAQ.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 05-29-2009, 07:25 PM
  2. from 2D array to 1D array
    By cfdprogrammer in forum C Programming
    Replies: 17
    Last Post: 03-24-2009, 10:33 AM
  3. [question]Analyzing data in a two-dimensional array
    By burbose in forum C Programming
    Replies: 2
    Last Post: 06-13-2005, 07:31 AM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Quick question about SIGSEGV
    By Cikotic in forum C Programming
    Replies: 30
    Last Post: 07-01-2004, 07:48 PM