numbers.cpp:6:12: error: 'lint pow [20]' redeclared as different kind of symbol
lint pow[20];
^
In file included from /usr/include/features.h:367:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/5/bits/c++config.h:482,
from /usr/include/c++/5/cstdio:41,
from numbers.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:1: note: previous declaration 'double pow(double, double)'
__MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
^
numbers.cpp: In function 'lint buho_calc(int, int, int, int)':
numbers.cpp:28:24: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if((piv / pow[d]) % 10 < i) break;
^
numbers.cpp:28:24: error: invalid operands of types 'lint {aka long long int}' and 'double(double, double) throw ()' to binary 'operator/'
numbers.cpp:30:28: warning: pointer to a function used in arithmetic [-Wpointer-arith]
if((piv / pow[d])%10 == i){
^
numbers.cpp:30:28: error: invalid operands of types 'lint {aka long long int}' and 'double(double, double) throw ()' to binary 'operator/'
numbers.cpp: In function 'lint f(lint)':
numbers.cpp:44:49: warning: pointer to a function used in arithmetic [-Wpointer-arith]
int i, lim = (int)(std::lower_bound(pow,pow+19,x+1) - pow);
^
numbers.cpp:44:59: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
int i, lim = (int)(std::lower_bound(pow,pow+19,x+1) - pow);
^
numbers.cpp: In function 'int main()':
numbers.cpp:55:10: warning: pointer to a function used in arithmetic [-Wpointer-arith]
pow[0] = 1;
^
numbers.cpp:55:12: error: assignment of function 'double pow(double, double)'
pow[0] = 1;
^
numbers.cpp:55:12: error: cannot convert 'int' to 'double(double, double) throw ()' in assignment
numbers.cpp:56:34: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for(int i=1; i<19; i++) pow[i] = pow[i-1] * 10;
^
numbers.cpp:56:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
for(int i=1; i<19; i++) pow[i] = pow[i-1] * 10;
^
numbers.cpp:56:45: warning: pointer to a function used in arithmetic [-Wpointer-arith]
numbers.cpp:56:49: error: invalid operands of types 'double(double, double) throw ()' and 'int' to binary 'operator*'
for(int i=1; i<19; i++) pow[i] = pow[i-1] * 10;
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0,
from /usr/include/c++/5/algorithm:61,
from numbers.cpp:2:
/usr/include/c++/5/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_less_val::operator()(_Iterator, _Value&) const [with _Iterator = double (*)(double, double) throw (); _Value = const long long int]':
/usr/include/c++/5/bits/stl_algobase.h:975:14: required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = double (*)(double, double) throw (); _Tp = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/usr/include/c++/5/bits/stl_algobase.h:1009:32: required from '_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = double (*)(double, double) throw (); _Tp = long long int]'
numbers.cpp:44:55: required from here
/usr/include/c++/5/bits/predefined_ops.h:55:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
{ return *__it < __val; }
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:66:0,
from /usr/include/c++/5/algorithm:61,
from numbers.cpp:2:
/usr/include/c++/5/bits/stl_iterator_base_funcs.h: In instantiation of 'typename std::iterator_traits<_Iterator>::difference_type std::__distance(_RandomAccessIterator, _RandomAccessIterator, std::random_access_iterator_tag) [with _RandomAccessIterator = double (*)(double, double) throw (); typename std::iterator_traits<_Iterator>::difference_type = long int]':
/usr/include/c++/5/bits/stl_iterator_base_funcs.h:117:29: required from 'typename std::iterator_traits<_Iterator>::difference_type std::distance(_InputIterator, _InputIterator) [with _InputIterator = double (*)(double, double) throw (); typename std::iterator_traits<_Iterator>::difference_type = long int]'
/usr/include/c++/5/bits/stl_algobase.h:968:42: required from '_ForwardIterator std::__lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&, _Compare) [with _ForwardIterator = double (*)(double, double) throw (); _Tp = long long int; _Compare = __gnu_cxx::__ops::_Iter_less_val]'
/usr/include/c++/5/bits/stl_algobase.h:1009:32: required from '_ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&) [with _ForwardIterator = double (*)(double, double) throw (); _Tp = long long int]'
numbers.cpp:44:55: required from here
/usr/include/c++/5/bits/stl_iterator_base_funcs.h:96:21: error: ISO C++ forbids using pointer to a function in subtraction [-fpermissive]
return __last - __first;
^
numbers.cpp:57:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld %lld",&a,&b);
^