Compiler output
prog.cpp: In function 'int main()':
prog.cpp:34:12: error: call of overloaded 'div(long int&, long int&)' is ambiguous
div(A,B);
^
prog.cpp:34:12: note: candidates are:
In file included from /usr/include/c++/4.9/cstdlib:72:0,
from /usr/include/c++/4.9/ext/string_conversions.h:41,
from /usr/include/c++/4.9/bits/basic_string.h:2850,
from /usr/include/c++/4.9/string:52,
from /usr/include/c++/4.9/bits/locale_classes.h:40,
from /usr/include/c++/4.9/bits/ios_base.h:41,
from /usr/include/c++/4.9/ios:42,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/stdlib.h:789:14: note: div_t div(int, int)
extern div_t div (int __numer, int __denom)
^
prog.cpp:3:6: note: void div(long int, long int)
void div(long A,long B)
^
In file included from /usr/include/c++/4.9/ext/string_conversions.h:41:0,
from /usr/include/c++/4.9/bits/basic_string.h:2850,
from /usr/include/c++/4.9/string:52,
from /usr/include/c++/4.9/bits/locale_classes.h:40,
from /usr/include/c++/4.9/bits/ios_base.h:41,
from /usr/include/c++/4.9/ios:42,
from /usr/include/c++/4.9/ostream:38,
from /usr/include/c++/4.9/iostream:39,
from prog.cpp:1:
/usr/include/c++/4.9/cstdlib:214:3: note: lldiv_t __gnu_cxx::div(long long int, long long int)
div(long long __n, long long __d)
^
/usr/include/c++/4.9/cstdlib:169:3: note: ldiv_t std::div(long int, long int)
div(long __i, long __j) { return ldiv(__i, __j); }
^