foo.cpp: In function 'int main()':
foo.cpp:7:24: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'int*' [-Wformat]
foo.cpp:7:24: warning: format '%ld' expects argument of type 'long int*', but argument 3 has type 'int*' [-Wformat]
foo.cpp:14:40: error: no matching function for call to 'max(int&, long int&)'
foo.cpp:14:40: note: candidates are:
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/algorithm:62:0,
from foo.cpp:2:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:210:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:210:5: note: template argument deduction/substitution failed:
foo.cpp:14:40: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/algorithm:62:0,
from foo.cpp:2:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:254:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
foo.cpp:14:40: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'long int')
foo.cpp:30:28: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat]