错误解释

CompileError!

编译信息

main.cpp: In function \xe2\x80\x98int* getnext(std::string)\xe2\x80\x99:\nmain.cpp:8:18: 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 8 | while (j < t.size() - 1) {\n | ~~^~~~~~~~~~~~~~\nmain.cpp: In function \xe2\x80\x98void Kmp(std::string, std::string)\xe2\x80\x99:\nmain.cpp:28:18: 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 28 | while (i < s.size() && j < t.size()) {\n | ~~^~~~~~~~~~\nmain.cpp:28:34: 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 28 | while (i < s.size() && j < t.size()) {\n | ~~^~~~~~~~~~\nmain.cpp:38: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 38 | if (j == t.size()) {\n | ~~^~~~~~~~~~~\nmain.cpp: In function \xe2\x80\x98int main()\xe2\x80\x99:\nmain.cpp:55:28: error: too few arguments to function \xe2\x80\x98int* getnext(std::string)\xe2\x80\x99\n 55 | int* next = getnext();\n | ~~~~~~~^~\nmain.cpp:3:6: note: declared here\n 3 | int* getnext(string t) {\n | ^~~~~~~\nmain.cpp:56:26: 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 56 | for (int i = 0;i < t.size();i++) {\n | ~~^~~~~~~~~~\n