repositories
/
TD_C.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d386f33
)
TP 12 exo2: to not handle scanf() return code for now
author
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Wed, 8 Mar 2017 21:05:01 +0000
(22:05 +0100)
committer
Jérôme Benoit
<jerome.benoit@piment-noir.org>
Wed, 8 Mar 2017 21:05:01 +0000
(22:05 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
TP_12/exo2/exo2.c
patch
|
blob
|
blame
|
history
diff --git
a/TP_12/exo2/exo2.c
b/TP_12/exo2/exo2.c
index 199d2999a17ca881693989ab8c331274d66fa8e7..f8dea49d1c81dd6d637be370dd1062502279a57c 100644
(file)
--- 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) {