Busted version of ex24.c with fscanf instead of fgets

cat-town
Dan Buch 13 years ago
parent 0a6404f838
commit afc7edba40

@ -28,7 +28,7 @@ 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 = fscanf(stdin, "%50s", 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? ");

Loading…
Cancel
Save