Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:8:13: error: no match for 'operator<' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'const char [4]')
    8 |         cout<"yes";
      |         ~~~~^~~~~~
      |         |    |
      |         |    const char [4]
      |         std::ostream {aka std::basic_ostream<char>}
In file included from /usr/include/c++/12/regex:66,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:110,
                 from /in/foo.cc:1:
/usr/include/c++/12/bits/regex.h:1103:5: note: candidate: 'template<class _BiIter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const sub_match<_BiIter>&)'
 1103 |     operator<(const sub_match<_BiIter>& __lhs, const sub_match<_BiIter>& __rhs)
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1103:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1184:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&, const sub_match<_BiIter>&)'
 1184 |     operator<(const __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1184:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::__cxx11::__sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1277:5: note: candidate: 'template<class _Bi_iter, class _Ch_traits, class _Ch_alloc> bool std::__cxx11::operator<(const sub_match<_BiIter>&, __sub_match_string<_Bi_iter, _Ch_traits, _Ch_alloc>&)'
 1277 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1277:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1351:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type*, const sub_match<_BiIter>&)'
 1351 |     operator<(typename iterator_traits<_Bi_iter>::value_type const* __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1351:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [4]'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1445:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type*)'
 1445 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1445:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1520:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const typename std::iterator_traits<_Iter>::value_type&, const sub_match<_BiIter>&)'
 1520 |     operator<(typename iterator_traits<_Bi_iter>::value_type const& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1520:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   mismatched types 'const std::__cxx11::sub_match<_BiIter>' and 'const char [4]'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/regex.h:1620:5: note: candidate: 'template<class _Bi_iter> bool std::__cxx11::operator<(const sub_match<_BiIter>&, const typename std::iterator_traits<_Iter>::value_type&)'
 1620 |     operator<(const sub_match<_Bi_iter>& __lhs,
      |     ^~~~~~~~
/usr/include/c++/12/bits/regex.h:1620:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::__cxx11::sub_match<_BiIter>'
    8 |         cout<"yes";
      |              ^~~~~
In file included from /usr/include/c++/12/string:47,
                 from /usr/include/c++/12/bits/locale_classes.h:40,
                 from /usr/include/c++/12/bits/ios_base.h:41,
                 from /usr/include/c++/12/ios:42,
                 from /usr/include/c++/12/istream:38,
                 from /usr/include/c++/12/sstream:38,
                 from /usr/include/c++/12/complex:45,
                 from /usr/include/c++/12/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/12/bits/stdc++.h:54:
/usr/include/c++/12/bits/stl_iterator.h:451:5: note: candidate: 'template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)'
  451 |     operator<(const reverse_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:451:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/stl_iterator.h:496:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  496 |     operator<(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:496:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/stl_iterator.h:1683:5: note: candidate: 'template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1683 |     operator<(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1683:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
    8 |         cout<"yes";
      |              ^~~~~
/usr/include/c++/12/bits/stl_iterator.h:1748:5: note: candidate: 'template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)'
 1748 |     operator<(const move_iterator<_Iterator>& __x,
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator.h:1748:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
    8 |         cout<"yes";
      |              ^~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:64,
                 from /usr/include/c++/12/string:50:
/usr/include/c++/12/bits/stl_pair.h:663:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
  663 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
/usr/include/c++/12/bits/stl_pair.h:663:5: note:   template argument deduction/substitution failed:
/in/foo.cc:8:14: note:   'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'const std::pair<_T1, _T2>'
    8 |         cout<"yes";
      |              ^~~~~
In file included from /usr/include/c++/12/string:53:
/usr/include/c++/12/bits/basic_string.h:3691:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc

信息

递交者
类型
递交
题目
P1705 判断奇偶
语言
C++
递交时间
2025-11-29 16:49:58
评测时间
2025-11-29 16:49:58
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes