错误解释

CompileError!

编译信息

main.cpp: In function \xe2\x80\x98int main()\xe2\x80\x99:\nmain.cpp:12: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 12 | for (int i=0;i<s1.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:19:14: error: expected unqualified-id before numeric constant\n 19 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:19:13: error: expected \xe2\x80\x98;\xe2\x80\x99 before numeric constant\n 19 | for (int 1=0;i<s2.length();i++)\n | ^~\n | ;\nmain.cpp:19:14: error: lvalue required as left operand of assignment\n 19 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:19: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 19 | for (int 1=0;i<s2.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:19:19: warning: value computed is not used [-Wunused-value]\nmain.cpp:19:31: error: expected \xe2\x80\x98)\xe2\x80\x99 before \xe2\x80\x98;\xe2\x80\x99 token\n 19 | for (int 1=0;i<s2.length();i++)\n | ~ ^\n | )\nmain.cpp:19:5: warning: this \xe2\x80\x98for\xe2\x80\x99 clause does not guard... [-Wmisleading-indentation]\n 19 | for (int 1=0;i<s2.length();i++)\n | ^~~\nmain.cpp:19:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the \xe2\x80\x98for\xe2\x80\x99\n 19 | for (int 1=0;i<s2.length();i++)\n | ^\nmain.cpp:19:35: error: expected \xe2\x80\x98;\xe2\x80\x99 before \xe2\x80\x98)\xe2\x80\x99 token\n 19 | for (int 1=0;i<s2.length();i++)\n | ^\n | ;\nmain.cpp:27: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 27 | for (i=0;i<s1.length();i++)\n | ~^~~~~~~~~~~~\nmain.cpp:34: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 34 | for (i=0;i<s2.length();i++)\n | ~^~~~~~~~~~~~\n