mcg.cpp:9:12: error: ‘lint pow [19]’ redeclared as different kind of symbol
lint pow[19] = {1,0};
^
In file included from /usr/include/features.h:374:0,
from /usr/include/x86_64-linux-gnu/c++/4.9/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/4.9/bits/c++config.h:430,
from /usr/include/c++/4.9/cstdio:41,
from mcg.cpp:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:153:1: note: previous declaration ‘double pow(double, double)’
__MATHCALL (pow,, (_Mdouble_ __x, _Mdouble_ __y));
^
mcg.cpp: In function ‘bool calc_valid(lint, lint)’:
mcg.cpp:13:32: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator+’
int t = lower_bound(pow,pow+19,x) - pow + lower_bound(pow,pow+19,y) - pow;
^
mcg.cpp:13:66: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator+’
int t = lower_bound(pow,pow+19,x) - pow + lower_bound(pow,pow+19,y) - pow;
^
mcg.cpp: In function ‘int main()’:
mcg.cpp:40:34: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
for(int i=1; i<=18; i++) pow[i] = pow[i-1] * 10;
^
mcg.cpp:40:45: error: invalid types ‘<unresolved overloaded function type>[int]’ for array subscript
for(int i=1; i<=18; i++) pow[i] = pow[i-1] * 10;
^
mcg.cpp: In function ‘void solve()’:
mcg.cpp:34:45: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld %lld %lld %lld",&a,&b,&p,&q);
^
mcg.cpp: In function ‘int main()’:
mcg.cpp:42:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&t);
^