Compile Error

/in/foo.cc: In function 'int pd(std::string)':
/in/foo.cc:7:18: 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:7:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
    7 |     for(int i=0;i<s.size();i++)
      |     ^~~
/in/foo.cc:10:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   10 |         if(s[i]>='A'&&s[i]<='Z')
      |         ^~
/in/foo.cc:10:14: error: 'i' was not declared in this scope
   10 |         if(s[i]>='A'&&s[i]<='Z')
      |              ^

信息

递交者
类型
递交
题目
P3012 密码强度202512GESP3级T1
语言
C++
递交时间
2026-05-30 14:27:19
评测时间
2026-05-30 14:27:19
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes