Problem | duckhunt12 |
---|---|
User | l |
Submission Time | 2025-06-17 10:12:15 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
duckhunt12.cpp: In function ‘int move(int*, int*)’:
duckhunt12.cpp:15:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | if (duck < 1 || duck > n)
| ^
duckhunt12.cpp:15:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
15 | if (duck < 1 || duck > n)
| ^
duckhunt12.cpp:16:8: error: cannot convert ‘bool’ to ‘int*’ in assignment
16 | dr = not dr;
| ^~~~~~
| |
| bool
duckhunt12.cpp: In function ‘int main()’:
duckhunt12.cpp:30:9: error: ‘c’ was not declared in this scope
30 | move(&c, &xD);
| ^
duckhunt12.cpp:31:15: error: no matching function for call to ‘move(int*, bool*)’
31 | move(&y, &yD);
| ^
duckhunt12.cpp:8:5: note: candidate: ‘int move(int*, int*)’
8 | int move(int* duck, int* dr)
| ^~~~<