Compiler output
prog.cpp:13:12: error: 'll pow10 [20]' redeclared as different kind of symbol
ll pow10[20] , a , b;
^
In file included from /usr/include/features.h:374:0,
from /usr/include/assert.h:35,
from /usr/include/c++/4.9/cassert:43,
from /usr/include/arm-linux-gnueabihf/c++/4.9/bits/stdc++.h:33,
from prog.cpp:1:
/usr/include/arm-linux-gnueabihf/bits/mathcalls.h:122:1: note: previous declaration 'double pow10(double)'
__MATHCALL (pow10,, (_Mdouble_ __x));
^
prog.cpp: In function 'll f(ll)':
prog.cpp:35:53: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if (i < v[0]) nr *= 1LL * pow10[v[0]-i-1] * 5;
^
prog.cpp:35:53: warning: pointer to a function used in arithmetic [-Wpointer-arith]
prog.cpp:35:53: error: invalid operands of types 'long long int' and 'double(double) throw ()' to binary 'operator*'
prog.cpp:43:52: warning: pointer to a function used in arithmetic [-Wpointer-arith]
else nr += 1LL * pow10[v[0]-i-1] * 5;
^
prog.cpp:43:52: warning: pointer to a function used in arithmetic [-Wpointer-arith]
prog.cpp:43:52: error: invalid operands of types 'long long int' and 'double(double) throw ()' to binary 'operator*'
prog.cpp:40:16: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
if (cf <= v[i])
^
prog.cpp: In function 'int main()':
prog.cpp:70:12: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[0] = 1;
^
prog.cpp:70:14: error: assignment of function 'double pow10(double)'
pow10[0] = 1;
^
prog.cpp:70:14: error: cannot convert 'int' to 'double(double) throw ()' in assignment
prog.cpp:72:16: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[i] = 1LL * pow10[i-1] * 10;
^
prog.cpp:72:35: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow10[i] = 1LL * pow10[i-1] * 10;
^
prog.cpp:72:35: warning: pointer to a function used in arithmetic [-Wpointer-arith]
prog.cpp:72:35: error: invalid operands of types 'long long int' and 'double(double) throw ()' to binary 'operator*'