Borderou de evaluare (job #2176322)
Utilizator | Data | 16 martie 2018 22:39:29 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | Arhiva de probleme | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c: In function ‘main’:
user.c:8:15: error: incompatible types when assigning to type ‘FILE {aka struct _IO_FILE}’ from type ‘int’
if(f= fopen("fisier.in", "rt")== NULL)
^
user.c:10:16: error: incompatible type for argument 1 of ‘fscanf’
fscanf(f,"%d", &a);
^
In file included from /usr/include/features.h:367:0,
from /usr/include/stdio.h:27,
from user.c:1:
/usr/include/stdio.h:443:12: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:11:17: error: incompatible type for argument 1 of ‘fscanf’
fscanf(f,"%d", &b);
^
In file included from /usr/include/features.h:367:0,
from /usr/include/stdio.h:27,
from user.c:1:
/usr/include/stdio.h:443:12: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
^
user.c:12:18: error: incompatible type for argument 1 of ‘fclose’
fclose(f);
^
In file included from user.c:1:0:
/usr/include/stdio.h:237:12: note: expected ‘FILE * {aka struct _IO_FILE *}’ but argument is of type ‘FILE {aka struct _IO_FILE}’
extern int fclose (FILE *__stream);
^
user.c:15:17: error: incompatible types when assigning to type ‘FILE {aka struct _IO_FILE}’ from type ‘int’
if(f1= fopen("fisier.out", "wt")== NULL)
^
user.c:17:17: error: incompatible type for argument 1 of ‘fprintf’
fprintf(f1,"%d",suma);
^
In file included from /usr/include/stdio.h:936:0,
from user.c:1:
/usr/include/bits/stdio2.h:95:1: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’
fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
^
user.c:18:28: error: incompatible type for argument 1 of ‘fclose’
fclose(f1);
^
In file included from user.c:1:0:
/usr/include/stdio.h:237:12: note: expected ‘FILE * {aka struct _IO_FILE *}’ but argument is of type ‘FILE {aka struct _IO_FILE}’
extern int fclose (FILE *__stream);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !