记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:24:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 |     while (i <= s.length())
      |            ~~^~~~~~~~~~~~~
/in/foo.cc:26:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |         if (i == s.length() || s[i] == ' ')
      |             ~~^~~~~~~~~~~~~
/in/foo.cc:36:14: error: redeclaration of 'auto it'
   36 |         auto it = w.find(c);
      |              ^~
/in/foo.cc:33:24: note: 'const std::string& it' previously declared here
   33 |     for (const string& it : a)
      |                        ^~

信息

递交者
类型
递交
题目
P1057 OO11-9 set与单词统计
比赛
2024级《面向对象的方法与实践》第六次作业
语言
C++
递交时间
2025-05-24 21:57:34
评测时间
2025-05-24 21:57:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes