Busted version of ex24.c with fscanf instead of fgets

This commit is contained in:
Dan Buch 2011-11-06 08:15:32 -05:00
parent 0a6404f838
commit afc7edba40

2
ex24.c
View File

@ -28,7 +28,7 @@ int main(int argc, char *argv[])
char *in = NULL;
printf("What's your First Name? ");
in = fgets(you.first_name, MAX_DATA-1, stdin);
in = fscanf(stdin, "%50s", you.first_name);
check(in != NULL, "Failed to read first name.");
printf("What's your Last Name? ");