0_0_20962981_29081.cpp:9:20: error: stray '#' in program
for(int j=1;j<n;j++)
^
0_0_20962981_29081.cpp:9:25: error: stray '#' in program
for(int j=1;j<n;j++)
^
0_0_20962981_29081.cpp:12:31: error: stray '#' in program
while(substr[j] != substr[i+1]&&i>=0)//此处是失败函数的关键,找不到就回退
^
0_0_20962981_29081.cpp:14:28: error: stray '#' in program
if(substr[j] == substr[i+1])
^
0_0_20962981_29081.cpp:15:13: error: stray '#' in program
f[j] = i+1;
^
0_0_20962981_29081.cpp:19:22: error: stray '#' in program
for(int i = 0;i<n;i++)
^
0_0_20962981_29081.cpp:19:27: error: stray '#' in program
for(int i = 0;i<n;i++)
^
0_0_20962981_29081.cpp:38:6: error: stray '#' in program
i++;
^
0_0_20962981_29081.cpp:38:11: error: stray '#' in program
i++;
^
0_0_20962981_29081.cpp:39:6: error: stray '#' in program
j++;
^
0_0_20962981_29081.cpp:39:11: error: stray '#' in program
j++;
^
0_0_20962981_29081.cpp:44:7: error: stray '#' in program
i++;
^
0_0_20962981_29081.cpp:44:12: error: stray '#' in program
i++;
^
0_0_20962981_29081.cpp:47:14: error: stray '#' in program
j=f[j-1]+1;
^
0_0_20962981_29081.cpp: In function 'void fail(int*, int, char*)':
0_0_20962981_29081.cpp:9:23: error: expected ')' before ';' token
for(int j=1;j<n;j++)
^
0_0_20962981_29081.cpp:9:26: error: lvalue required as unary '&' operand
for(int j=1;j<n;j++)
^
0_0_20962981_29081.cpp:9:29: error: expected primary-expression before ')' token
for(int j=1;j<n;j++)
^
0_0_20962981_29081.cpp:19:25: error: expected ')' before ';' token
for(int i = 0;i<n;i++)
^
0_0_20962981_29081.cpp:19:28: error: lvalue required as unary '&' operand
for(int i = 0;i<n;i++)
^
0_0_20962981_29081.cpp:19:31: error: expected primary-expression before ')' token
for(int i = 0;i<n;i++)
^
0_0_20962981_29081.cpp: In function 'int KMP(char*, int, char*, int)':
0_0_20962981_29081.cpp:38:12: error: lvalue required as unary '&' operand
i++;
^
0_0_20962981_29081.cpp:39:12: error: lvalue required as unary '&' operand
j++;
^
0_0_20962981_29081.cpp:44:13: error: lvalue required as unary '&' operand
i++;
^
0_0_20962981_29081.cpp:45:4: error: 'else' without a previous 'if'
else
^
|