foo.cc: In function 'int main()':
foo.cc:14:31: 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 (i = 0; i < S.length(); i++) {
| ~~^~~~~~~~~~~~
foo.cc:24:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
24 | if (i == S.length())
| ~~^~~~~~~~~~~~~
foo.cc:27:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
27 | for (; i < S.length(); i++) {
| ~~^~~~~~~~~~~~
foo.cc:33:31: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
33 | if (i == S.length())
| ~~^~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务