From: Jérôme Benoit Date: Wed, 8 Mar 2017 21:05:01 +0000 (+0100) Subject: TP 12 exo2: to not handle scanf() return code for now X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9091c930ead4158566055f1db38c206652d42c4a;p=TD_C.git TP 12 exo2: to not handle scanf() return code for now Signed-off-by: Jérôme Benoit --- diff --git a/TP_12/exo2/exo2.c b/TP_12/exo2/exo2.c index 199d299..f8dea49 100644 --- a/TP_12/exo2/exo2.c +++ b/TP_12/exo2/exo2.c @@ -7,11 +7,7 @@ int main() { FILE* fp; printf("Enter the name of the file you wish to see\n"); - int prt = scanf("%s", fname); - /* if (prt != 0) { - perror("Error entering the file name.\n"); - exit(EXIT_FAILURE); - } */ + scanf("%s", fname); fp = fopen(fname, "r"); /* read mode */ if (fp == NULL) {