Borderou de evaluare (job #1340126)
Utilizator | Data | 11 februarie 2015 15:52:24 | |
---|---|---|---|
Problema | Fractii | Status | done |
Runda | Arhiva de probleme | Compilator | c | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.c:7:1: warning: data definition has no type or storage class [enabled by default]
fp = fopen("fractii.in","r+");
^
user.c:7:1: warning: type defaults to ‘int’ in declaration of ‘fp’ [enabled by default]
user.c:7:1: error: conflicting types for ‘fp’
user.c:5:8: note: previous declaration of ‘fp’ was here
FILE * fp;
^
user.c:7:6: warning: initialization makes integer from pointer without a cast [enabled by default]
fp = fopen("fractii.in","r+");
^
user.c:7:1: error: initializer element is not constant
fp = fopen("fractii.in","r+");
^
user.c:8:1: warning: data definition has no type or storage class [enabled by default]
fp2 = fopen("fractii.out","w+");
^
user.c:8:1: warning: type defaults to ‘int’ in declaration of ‘fp2’ [enabled by default]
user.c:8:1: error: conflicting types for ‘fp2’
user.c:6:8: note: previous declaration of ‘fp2’ was here
FILE * fp2;
^
user.c:8:7: warning: initialization makes integer from pointer without a cast [enabled by default]
fp2 = fopen("fractii.out","w+");
^
user.c:8:1: error: initializer element is not constant
fp2 = fopen("fractii.out","w+");
^
user.c: In function ‘main’:
user.c:14:5: warning: passing argument 1 of ‘fscanf’ makes pointer from integer without a cast [enabled by default]
fscanf(fp,"%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:27:5: warning: passing argument 1 of ‘fprintf’ makes pointer from integer without a cast [enabled by default]
fprintf(fp2,"%d",r);
^
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:27:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=]
fprintf(fp2,"%d",r);
^
user.c:14:11: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !