Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:7:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |         for(int i=0;i<=s.size();i++)
      |                     ~^~~~~~~~~~
/in/foo.cc:11:28: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   11 |                         s1=substr(0,i+1);
      |                            ^~~~~~
      |                            strstr

信息

递交者
类型
自测
题目
P2531 字符串逆序
语言
C++
递交时间
2026-11-28 14:27:34
评测时间
2026-11-28 14:27:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes