/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:26:25: error: no match for 'operator==' in 'c == 'Y''
foo.cpp:26:25: note: candidates are:
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/iosfwd:42:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/ios:39,
                 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:1:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/postypes.h:218:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/postypes.h:218:5: note:   template argument deduction/substitution failed:
foo.cpp:26:25: note:   'std::string {aka std::basic_string<char>}' is not derived from 'const std::fpos<_StateT>'
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:65:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41,
                 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:1:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_pair.h:212:5: note: template<class _T1, class _T2> bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_pair.h:212:5: note:   template argument deduction/substitution failed:
foo.cpp:26:25: note:   'std::string {aka std::basic_string<char>}' is not derived from 'const std::pair<_T1, _T2>'
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:68:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41,
                 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:1:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_iterator.h:293:5: note: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_iterator.h:293:5: note:   template argument deduction/substitution failed:
foo.cpp:26:25: note:   'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_Iterator>'
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_algobase.h:68:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/char_traits.h:41,
                 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:1:
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_iterator.h:343:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/stl_iterator.h:343:5: note:   template argument deduction/substitution failed:
foo.cpp:26:25: note:   'std::string {aka std::basic_string<char>}' is not derived from 'const std::reverse_iterator<_IteratorL>'
In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/string:43:0,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/include/c++/bits/locale_classes.h:42,
                 from c:\mingw32\bin\../lib/gcc/mingw32/4.7.1/inc

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2014-09-09 22:50:24
评测时间
2014-09-09 22:50:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes