/ Vijos /

记录详情

Compile Error

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]

信息

递交者
类型
递交
题目
P1843 货车运输
语言
C++
递交时间
2013-11-12 18:09:32
评测时间
2013-11-12 18:09:33
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes