Validation _ctype.h

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Geekibz
    New Member
    • Jan 2008
    • 12

    #1

    Validation _ctype.h

    Hi>Using ctype.h header file I want to validate user input such that if they enter input of the type not specified an error message is generated and the user then gets a chance to input again_I haven't been able to do the latter>Please help:
    #include<stdio. h>
    #include<ctype. h>
    Printf("Name:") ;
    scanf("%s",&Nam e);
    isalpha(Name);/*error output if user inputs integer. however user cannot input again*/
    Pls help.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Forget about validating the input.

    First, write a program that gets data from the user until the user says no more data.

    Then worry about validating the input.

    Comment

    Working...