Borderou de evaluare (job #1577810)
Utilizator | Data | 23 ianuarie 2016 21:13:49 | |
---|---|---|---|
Problema | Reactivi | Status | done |
Runda | Arhiva de probleme | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c:9:1: warning: data definition has no type or storage class [enabled by default]
f = fopen("react.in","r");
^
user.c:9:1: warning: type defaults to ‘int’ in declaration of ‘f’ [enabled by default]
user.c:9:1: error: conflicting types for ‘f’
user.c:8:7: note: previous declaration of ‘f’ was here
FILE *f, *g;
^
user.c:9:5: warning: initialization makes integer from pointer without a cast [enabled by default]
f = fopen("react.in","r");
^
user.c:9:1: error: initializer element is not constant
f = fopen("react.in","r");
^
user.c:10:1: warning: data definition has no type or storage class [enabled by default]
g = fopen("react.out","w");
^
user.c:10:1: warning: type defaults to ‘int’ in declaration of ‘g’ [enabled by default]
user.c:10:1: error: conflicting types for ‘g’
user.c:8:11: note: previous declaration of ‘g’ was here
FILE *f, *g;
^
user.c:10:5: warning: initialization makes integer from pointer without a cast [enabled by default]
g = fopen("react.out","w");
^
user.c:10:1: error: initializer element is not constant
g = fopen("react.out","w");
^
user.c: In function ‘main’:
user.c:14:2: warning: passing argument 1 of ‘fscanf’ makes pointer from integer without a cast [enabled by default]
fscanf(f,"%d",&n);
^
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:17:6: warning: passing argument 1 of ‘fscanf’ makes pointer from integer without a cast [enabled by default]
fscanf(f, "%d%d" ,&r[i].min,&r[i].max);
^
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:51:2: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast [enabled by default]
fprintf (g,"\n%d",frigidere);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !