Like the title stated, how can I validate a user's input for name?
I saw someone posted this in another similar thread.
I don't understand this partCode:char buff[BUFSIZ];while ( fgets( buff, BUFSIZ, stdin ) != NULL ) { if ( validate(buff) ) { // do your thing } else { // complain }}And, for validate(buff), if I use isalpha() , I guess that won't work right? Since it is only for validating a character.Any clues?Code:while ( fgets( buff, BUFSIZ, stdin ) != NULL )