Borderou de evaluare (job #613835)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Macheta (clasa a 8-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 2 nov. 2021 17:00:19 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:21:20: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'short int*' [-Wformat=]
21 | fscanf( fin, "%d%d%d%d%d", &x[i], &yCoord, &y[i], &ly, &height[i] );
| ~^ ~~~~~
| | |
| int* short int*
| %hd
main.cpp:21:24: warning: format '%d' expects argument of type 'int*', but argument 5 has type 'short int*' [-Wformat=]
21 | fscanf( fin, "%d%d%d%d%d", &x[i], &yCoord, &y[i], &ly, &height[i] );
| ~^ ~~~~~
| | |
| int* short int*
| %hd
main.cpp:21:28: warning: format '%d' expects argument of type 'int*', but argument 7 has type 'short int*' [-Wformat=]
21 | fscanf( fin, "%d%d%d%d%d", &x[i], &yCoord, &y[i], &ly, &height[i] );
| ~^ ~~~~~~~~~~
| | |
| int* short int*
| %hd
main.cpp:22:5: error: 'nxt' was not declared in this scope; did you mean 'next'?
22 | nxt[i] = lists[yCoord];
| ^~~
| next
main.cpp:31:16: error: 'xCoordx' was not declared in this scope; did you mean 'xCoord'?
31 | maxx[xCoordx] = height[i];
| ^~~~~~~
| xCoord
main.cpp:33:11: error: 'nxt' was not declared in this scope; did you mean 'next'?
33 | i = nxt[i];
| ^~~
| next
main.cpp:43:11: error: expected '}' at end of input
43 | return 0;
| ^
main.cpp:12:12: note: to match this '{'
12 | int main() {
| ^
main.cpp:18:9: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
18 | fscanf( fin, "%d", &n );
| ~~~~~~^~~~~~~~~~~~~~~~~
main.cpp:21:11: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
21 | fscanf( fin, "%d%d%d%d%d", &x[i], &yCoord, &y[i], &ly, &height[i] );
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~