/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:40:26: error: no matching function for call to 'max(long long int&, int&)'
foo.cpp:40:26: note: candidates are:
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ios:41,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ostream:40,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/iostream:40,
                 from foo.cpp:3:
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:40:26: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ios:41,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ostream:40,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/iostream:40,
                 from foo.cpp:3:
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:40:26: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')

信息

递交者
类型
递交
题目
P1740 聪明的质检员
语言
C++
递交时间
2014-11-06 17:11:06
评测时间
2014-11-06 17:11:06
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes