cmp.cpp:8:10: error: 'int pow [6]' redeclared as different kind of entity
8 | int pow[6] = {1,4,16,64,256,1024};
| ^
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 cmp.cpp:2:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:140:1: note: previous declaration 'double pow(double, double)'
140 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
| ^~~~~~~~~~~~~~
cmp.cpp: In function 'void remember(int)':
cmp.cpp:12:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
12 | s += pow[i] * (value%4);
| ^
cmp.cpp: In function 'int compare(int)':
cmp.cpp:23:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
23 | s += pow[i] * (value%4);
| ^
cmp.cpp:33:3: error: 'x' was not declared in this scope
33 | x = (l+r)/2;
| ^
cmp.cpp:42:3: error: 'x' was not declared in this scope
42 | x = 0;
| ^
cmp.cpp:47:2: error: 'x' was not declared in this scope
47 | x = 0;
| ^
cmp.cpp:49:10: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
49 | x += pow[l]*3;
| ^