错误解释

CompileError!

编译信息

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