Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:9:10: error: no matching function for call to 'reverse(std::__cxx11::string&)'
 reverse(s);
          ^
In file included from /usr/include/c++/6/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:65,
                 from /in/foo.cc:1:
/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:9:10: note:   candidate expects 2 arguments, 1 provided
 reverse(s);
          ^

信息

递交者
类型
递交
题目
P1030 反转三位数
语言
C++
递交时间
2025-09-14 15:51:30
评测时间
2025-09-14 15:51:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes