/ Vijos /

记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:12:30: error: no matching function for call to 'reverse(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
  t4=reverse(a1.begin(),a1.end);
                              ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h:1177:5: note: candidate: template<class _BIter> void std::reverse(_BIter, _BIter)
     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
     ^~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1177:5: note:   template argument deduction/substitution failed:
/in/foo.cc:12:30: note:   could not resolve address from overloaded function 'a1.std::__cxx11::basic_string<char>::end'
  t4=reverse(a1.begin(),a1.end);
                              ^
/in/foo.cc:13:30: error: no matching function for call to 'reverse(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
  t5=reverse(a2.begin(),a2.end);
                              ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h:1177:5: note: candidate: template<class _BIter> void std::reverse(_BIter, _BIter)
     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
     ^~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1177:5: note:   template argument deduction/substitution failed:
/in/foo.cc:13:30: note:   could not resolve address from overloaded function 'a2.std::__cxx11::basic_string<char>::end'
  t5=reverse(a2.begin(),a2.end);
                              ^
/in/foo.cc:14:30: error: no matching function for call to 'reverse(std::__cxx11::basic_string<char>::iterator, <unresolved overloaded function type>)'
  t6=reverse(a3.begin(),a3.end);
                              ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_algo.h:1177:5: note: candidate: template<class _BIter> void std::reverse(_BIter, _BIter)
     reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
     ^~~~~~~
/usr/include/c++/6/bits/stl_algo.h:1177:5: note:   template argument deduction/substitution failed:
/in/foo.cc:14:30: note:   could not resolve address from overloaded function 'a3.std::__cxx11::basic_string<char>::end'
  t6=reverse(a3.begin(),a3.end);
                              ^

信息

递交者
类型
递交
题目
P1449 字符串还原
语言
C++
递交时间
2019-11-02 10:41:42
评测时间
2019-11-02 10:41:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes