Borderou de evaluare (job #1817382)
Utilizator | Data | 27 noiembrie 2016 18:36:12 | |
---|---|---|---|
Problema | A+B | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp: In function ‘int main()’:
user.cpp:10:29: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘const char*’ for argument ‘1’ to ‘FILE* fopen(const char*, const char*)’
fopen(in, "adunare.in", "r");
^
user.cpp:11:31: error: cannot convert ‘FILE* {aka _IO_FILE*}’ to ‘const char*’ for argument ‘1’ to ‘FILE* fopen(const char*, const char*)’
fopen(out, "adunare.out", "w");
^
user.cpp:13:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long int*’ [-Wformat=]
fscanf(in, "%d", &a);
^
user.cpp:14:21: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long int*’ [-Wformat=]
fscanf(in, "%d", &b);
^
user.cpp:15:28: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
fprintf(out, "%d", (a + b));
^
user.cpp:13:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(in, "%d", &a);
^
user.cpp:14:22: warning: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
fscanf(in, "%d", &b);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !