sequence.cpp:5:19: error: 'long long int pow10 [18]' redeclared as different kind of symbol
long long pow10[18];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/c++config.h:533,
from /usr/include/c++/7/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:33,
from sequence.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:122:1: note: previous declaration 'double pow10(double)'
__MATHCALL (pow10,, (_Mdouble_ __x));
^
sequence.cpp: In function 'void go(std::vector<int>, long long int, int)':
sequence.cpp:12:47: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (vec[0] >> i & 1) cur += i * pow10[cnt++];
^
sequence.cpp:12:34: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator*'
if (vec[0] >> i & 1) cur += i * pow10[cnt++];
~~^~~~~~~~~~~~~~
sequence.cpp:29:31: warning: pointer to a function used in arithmetic [-Wpointer-arith]
go(buf, cur + i * pow10[cnt], cnt + 1);
^
sequence.cpp:29:20: error: invalid operands of types 'int' and 'double(double) noexcept' to binary 'operator*'
go(buf, cur + i * pow10[cnt], cnt + 1);
~~^~~~~~~~~~~~
sequence.cpp: In function 'int main()':
sequence.cpp:41:9: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[0] = 1;
^
sequence.cpp:41:13: error: assignment of function 'double pow10(double)'
pow10[0] = 1;
^
sequence.cpp:41:13: error: cannot convert 'int' to 'double(double) noexcept' in assignment
sequence.cpp:42:38: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for (int i = 1; i < 18; ++i) pow10[i] = pow10[i - 1] * 10;
^
sequence.cpp:42:53: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for (int i = 1; i < 18; ++i) pow10[i] = pow10[i - 1] * 10;
^
cc1plus: warning: pointer to a function used in arithmetic [-Wpointer-arith]
sequence.cpp:42:55: error: invalid operands of types 'double(double) noexcept' and 'int' to binary 'operator*'
for (int i = 1; i < 18; ++i) pow10[i] = pow10[i - 1] * 10;
~~~~~~~~~~~~~^~~~