Borderou de evaluare (job #2571005)
Utilizator | Data | 4 martie 2020 20:24:46 | |
---|---|---|---|
Problema | Ape | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:43:24: warning: array subscript has type 'char' [-Wchar-subscripts]
coord.x += dx[d];
^
main.cpp:44:24: warning: array subscript has type 'char' [-Wchar-subscripts]
coord.y += dy[d];
^
main.cpp:66:20: warning: array subscript has type 'char' [-Wchar-subscripts]
val += dy[d] * coord.x;
^
main.cpp:70:25: error: 'abs' was not declared in this scope
printf("%d" ,abs(val) - P/2 + 1);
^
main.cpp:70:25: note: suggested alternative:
In file included from main.cpp:2:0:
/usr/include/c++/6/cmath:103:5: note: 'std::abs'
abs(_Tp __x)
^~~
main.cpp:11:32: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("ape.in","r",stdin);
^
main.cpp:12:34: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
freopen("ape.out","w",stdout);
^
main.cpp:18:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d ", &P);
^
main.cpp:42:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c", &d);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !