Compile Error

/in/foo.cc: In function 'int f(std::string)':
/in/foo.cc:14:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |         for(int i=1;i<=s.size();i++)
      |                     ~^~~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:32:29: error: expected ';' at end of input
   32 |                         cout
      |                             ^
      |                             ;
/in/foo.cc:32:25: warning: statement has no effect [-Wunused-value]
   32 |                         cout
      |                         ^~~~
/in/foo.cc:31:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   31 |                 else
      |                 ^~~~
/in/foo.cc:32:29: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   32 |                         cout
      |                             ^
/in/foo.cc:32:29: error: expected '}' at end of input
/in/foo.cc:27:9: note: to match this '{'
   27 |         {
      |         ^
/in/foo.cc:32:29: error: expected '}' at end of input
   32 |                         cout
      |                             ^
/in/foo.cc:24:1: note: to match this '{'
   24 | {
      | ^

信息

递交者
类型
递交
题目
P3012 密码强度202512GESP3级T1
语言
C++
递交时间
2025-12-30 20:09:49
评测时间
2025-12-30 20:09:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes