Borderou de evaluare (job #2258695)
Utilizator | Data | 11 octombrie 2018 20:38:24 | |
---|---|---|---|
Problema | Vase | 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:12:19: error: cannot convert ‘const char*’ to ‘FILE* {aka _IO_FILE*}’ for argument ‘1’ to ‘int fscanf(FILE*, const char*, ...)’
fscanf("%d",&n);
^
user.cpp:15:38: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d %c\n",&v[i],&opt[i]);
^
user.cpp:19:18: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘long int*’ [-Wformat=]
scanf("%d",&x);
^
user.cpp:53:12: error: ‘f’ was not declared in this scope
fclose(f);
^
user.cpp:54:12: error: ‘g’ was not declared in this scope
fclose(g);
^
user.cpp:11:11: warning: unused variable ‘j’ [-Wunused-variable]
int i,j;
^
user.cpp:9:33: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("vase.in","r",stdin);
^
user.cpp:10:35: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("vase.out","w",stdout);
^
user.cpp:15:39: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %c\n",&v[i],&opt[i]);
^
user.cpp:19:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !