错误解释

CompileError!

编译信息

main.cpp: In function \xe2\x80\x98int main()\xe2\x80\x99:\nmain.cpp:10:19: warning: comparison of integer expressions of different signedness: \xe2\x80\x98int\xe2\x80\x99 and \xe2\x80\x98std::__cxx11::basic_string<char>::size_type\xe2\x80\x99 {aka \xe2\x80\x98long unsigned int\xe2\x80\x99} [-Wsign-compare]\n 10 | for (int i=0;i<s1.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:17:14: error: expected unqualified-id before numeric constant\n 17 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:17:13: error: expected \xe2\x80\x98;\xe2\x80\x99 before numeric constant\n 17 | for (int 1=0;i<s2.length();i++)\n | ^~\n | ;\nmain.cpp:17:14: error: lvalue required as left operand of assignment\n 17 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:17:19: warning: comparison of integer expressions of different signedness: \xe2\x80\x98int\xe2\x80\x99 and \xe2\x80\x98std::__cxx11::basic_string<char>::size_type\xe2\x80\x99 {aka \xe2\x80\x98long unsigned int\xe2\x80\x99} [-Wsign-compare]\n 17 | for (int 1=0;i<s2.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:17:19: warning: value computed is not used [-Wunused-value]\nmain.cpp:17:31: error: expected \xe2\x80\x98)\xe2\x80\x99 before \xe2\x80\x98;\xe2\x80\x99 token\n 17 | for (int 1=0;i<s2.length();i++)\n | ~ ^\n | )\nmain.cpp:17:5: warning: this \xe2\x80\x98for\xe2\x80\x99 clause does not guard... [-Wmisleading-indentation]\n 17 | for (int 1=0;i<s2.length();i++)\n | ^~~\nmain.cpp:17:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the \xe2\x80\x98for\xe2\x80\x99\n 17 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:17:35: error: expected \xe2\x80\x98;\xe2\x80\x99 before \xe2\x80\x98)\xe2\x80\x99 token\n 17 | for (int 1=0;i<s2.length();i++)\n | ^\n | ;\nmain.cpp:25:15: warning: comparison of integer expressions of different signedness: \xe2\x80\x98int\xe2\x80\x99 and \xe2\x80\x98std::__cxx11::basic_string<char>::size_type\xe2\x80\x99 {aka \xe2\x80\x98long unsigned int\xe2\x80\x99} [-Wsign-compare]\n 25 | for (i=0;i<s1.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:32:15: warning: comparison of integer expressions of different signedness: \xe2\x80\x98int\xe2\x80\x99 and \xe2\x80\x98std::__cxx11::basic_string<char>::size_type\xe2\x80\x99 {aka \xe2\x80\x98long unsigned int\xe2\x80\x99} [-Wsign-compare]\n 32 | for (i=0;i<s2.length();i++)\n | ~^~~~~~~~~~~~\n