aliens.cpp:4:12: error: 'int y0' redeclared as different kind of entity
4 | int n, x0, y0;
| ^~
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
from /usr/include/c++/10/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from aliens.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:220:1: note: previous declaration 'double y0(double)'
220 | __MATHCALL (y0,, (_Mdouble_));
| ^~~~~~~~~~
aliens.cpp: In function 'int find(int, int)':
aliens.cpp:18:30: warning: pointer to a function used in arithmetic [-Wpointer-arith]
18 | while (examine(x0+(r<<i), y0+(d<<i))) i++;
| ~~^~~~~~~
aliens.cpp:18:30: error: invalid conversion from 'double (*)(double) noexcept' to 'int' [-fpermissive]
aliens.cpp:8:25: note: initializing argument 2 of 'bool examine(int, int)'
8 | bool examine(int i, int j) {
| ~~~~^
aliens.cpp:22:25: warning: pointer to a function used in arithmetic [-Wpointer-arith]
22 | if (query(x0+mid*r, y0+mid*d)) lo=mid;
| ~~^~~~~~
aliens.cpp:22:7: error: 'query' was not declared in this scope
22 | if (query(x0+mid*r, y0+mid*d)) lo=mid;
| ^~~~~
aliens.cpp: In function 'int main()':
aliens.cpp:35:6: error: redeclaration of 'int x'
35 | int x=(r+l)/2, y=(t+b)/2;
| ^
aliens.cpp:30:9: note: 'int x' previously declared here
30 | int n, x, y;
| ^
aliens.cpp:35:17: error: redeclaration of 'int y'
35 | int x=(r+l)/2, y=(t+b)/2;
| ^
aliens.cpp:30:12: note: 'int y' previously declared here
30 | int n, x, y;
| ^