Crappy version using gets instead of fgets

This commit is contained in:
Dan Buch 2011-11-06 09:19:25 -05:00
parent a0ebd0b587
commit 6f8c69f763

4
ex24.c
View File

@ -28,11 +28,11 @@ int main(int argc, char *argv[])
char *in = NULL; char *in = NULL;
printf("What's your First Name? "); printf("What's your First Name? ");
in = fgets(you.first_name, MAX_DATA-1, stdin); in = gets(you.first_name);
check(in != NULL, "Failed to read first name."); check(in != NULL, "Failed to read first name.");
printf("What's your Last Name? "); printf("What's your Last Name? ");
in = fgets(you.last_name, MAX_DATA-1, stdin); in = gets(you.last_name);
check(in != NULL, "Failed to read last name."); check(in != NULL, "Failed to read last name.");
printf("How old are you? "); printf("How old are you? ");