Borderou de evaluare (job #1803867)
Utilizator | Data | 11 noiembrie 2016 22:58:03 | |
---|---|---|---|
Problema | Granita | Status | done |
Runda | Arhiva de probleme | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c: In function ‘main’:
user.c:30:8: warning: assignment from incompatible pointer type [enabled by default]
f = fopen("granita.in", "r+");
^
user.c:31:6: warning: implicit declaration of function ‘eof’ [-Wimplicit-function-declaration]
while(!(eof(f)))
^
user.c:33:10: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
fscanf(f, "%d",&s);
^
In file included from /usr/include/features.h:357:0,
from /usr/include/stdio.h:28,
from user.c:1:
/usr/include/stdio.h:449:12: note: expected ‘struct FILE * restrict’ but argument is of type ‘int *’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:33:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int **’ [-Wformat=]
fscanf(f, "%d",&s);
^
user.c:34:10: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
fscanf(f,"%d",&f);
^
In file included from /usr/include/features.h:357:0,
from /usr/include/stdio.h:28,
from user.c:1:
/usr/include/stdio.h:449:12: note: expected ‘struct FILE * restrict’ but argument is of type ‘int *’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:34:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 3 has type ‘int **’ [-Wformat=]
fscanf(f,"%d",&f);
^
user.c:37:8: warning: assignment from incompatible pointer type [enabled by default]
f = fopen("granita.out", "w+");
^
user.c:38:9: warning: passing argument 1 of ‘fprintf’ from incompatible pointer type [enabled by default]
fprintf(f,"%d ",Greedy(s,f,4));
^
In file included from /usr/include/stdio.h:934:0,
from user.c:1:
/usr/include/i386-linux-gnu/bits/stdio2.h:96:1: note: expected ‘struct FILE * restrict’ but argument is of type ‘int *’
fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
^
user.c:33:16: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f, "%d",&s);
^
user.c:34:16: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(f,"%d",&f);
^
/tmp/ccI4Ez2v.o: In function `main':
user.c:(.text.startup+0x88): undefined reference to `eof'
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !