Borderou de evaluare (job #2176315)

Utilizator madalina.sassss madalina. Data 16 martie 2018 22:33:12
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", "rb")== NULL) ^ user.c:10:41: error: incompatible type for argument 4 of ‘fread’ if( fread(&a, sizeof(long), 1, f)!= 1) ^ In file included from /usr/include/stdio.h:936:0, from user.c:1: /usr/include/bits/stdio2.h:282:1: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’ fread (void *__restrict __ptr, size_t __size, size_t __n, ^ user.c:12:44: error: incompatible type for argument 4 of ‘fread’ else fread(&a, sizeof(long), 1, f); ^ In file included from /usr/include/stdio.h:936:0, from user.c:1: /usr/include/bits/stdio2.h:282:1: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’ fread (void *__restrict __ptr, size_t __size, size_t __n, ^ user.c:13:43: error: incompatible type for argument 4 of ‘fread’ if( fread(&b, sizeof(long), 1, f)!= 1) ^ In file included from /usr/include/stdio.h:936:0, from user.c:1: /usr/include/bits/stdio2.h:282:1: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’ fread (void *__restrict __ptr, size_t __size, size_t __n, ^ user.c:15:44: error: incompatible type for argument 4 of ‘fread’ else fread(&b, sizeof(long), 1, f); ^ In file included from /usr/include/stdio.h:936:0, from user.c:1: /usr/include/bits/stdio2.h:282:1: note: expected ‘FILE * restrict {aka struct _IO_FILE * restrict}’ but argument is of type ‘FILE {aka struct _IO_FILE}’ fread (void *__restrict __ptr, size_t __size, size_t __n, ^ user.c:16: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:19:17: error: incompatible types when assigning to type ‘FILE {aka struct _IO_FILE}’ from type ‘int’ if(f1= fopen("fisier.out", "wb")== NULL) ^ user.c:21:46: error: incompatible type for argument 4 of ‘fwrite’ if( fwrite(&suma,sizeof(long), 1, f1)!= 1) ^ In file included from user.c:1:0:

Ceva nu functioneaza?