Borderou de evaluare (job #1431117)
Utilizator | Data | 9 mai 2015 00:19:54 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | teme_upb | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c: In function ‘main’:
user.c:5:2: error: invalid initializer
FILE f=fopen("adunare.in","r");
^
user.c:6:2: warning: passing argument 1 of ‘fscanf’ from incompatible pointer type [enabled by default]
fscanf("%d%d",&x,&y);
^
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 ‘char *’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:6:2: warning: passing argument 2 of ‘fscanf’ from incompatible pointer type [enabled by default]
fscanf("%d%d",&x,&y);
^
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 ‘const char * restrict’ but argument is of type ‘long int *’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:7:2: error: incompatible type for argument 1 of ‘fclose’
fclose(f);
^
In file included from user.c:1:0:
/usr/include/stdio.h:238:12: note: expected ‘struct FILE *’ but argument is of type ‘FILE’
extern int fclose (FILE *__stream);
^
user.c:8:2: error: invalid initializer
FILE q=fopen("adunare.out","w");
^
user.c:9:2: warning: passing argument 1 of ‘fprintf’ from incompatible pointer type [enabled by default]
fprintf("%d",x+y);
^
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 ‘char *’
fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
^
user.c:9:2: warning: passing argument 2 of ‘fprintf’ makes pointer from integer without a cast [enabled by default]
fprintf("%d",x+y);
^
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 ‘const char * restrict’ but argument is of type ‘long int’
fprintf (FILE *__restrict __stream, __const char *__restrict __fmt, ...)
^
user.c:10:2: error: incompatible type for argument 1 of ‘fclose’
fclose(q);
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !