Setting back to correct version using fgets
This commit is contained in:
parent
6f8c69f763
commit
74e3d00e44
4
ex24.c
4
ex24.c
@ -28,11 +28,11 @@ int main(int argc, char *argv[])
|
||||
char *in = NULL;
|
||||
|
||||
printf("What's your First Name? ");
|
||||
in = gets(you.first_name);
|
||||
in = fgets(you.first_name, MAX_DATA-1, stdin);
|
||||
check(in != NULL, "Failed to read first name.");
|
||||
|
||||
printf("What's your Last Name? ");
|
||||
in = gets(you.last_name);
|
||||
in = fgets(you.last_name, MAX_DATA-1, stdin);
|
||||
check(in != NULL, "Failed to read last name.");
|
||||
|
||||
printf("How old are you? ");
|
||||
|
Loading…
Reference in New Issue
Block a user