Problem duckhunt12
User l
Submission Time 2025-06-17 10:12:29
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt12.cpp: In function ‘int move(int*, bool*)’:
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 ‘bool*’ 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);
| ^