0_0_29214923_15435.cpp:2:5: error: 'nbsp' declared as reference but not initialized
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp:2:10: error: 'a' does not name a type
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp:2:27: error: 'b' does not name a type
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp:3:5: error: redefinition of 'int& nbsp'
int next[10010];
^
0_0_29214923_15435.cpp:2:5: note: 'int& nbsp' previously declared here
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp:3:10: error: 'next' does not name a type
int next[10010];
^
0_0_29214923_15435.cpp:4:5: error: redefinition of 'int& nbsp'
int n, m;
^
0_0_29214923_15435.cpp:2:5: note: 'int& nbsp' previously declared here
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp:4:10: error: 'n' does not name a type
int n, m;
^
0_0_29214923_15435.cpp:4:18: error: 'm' does not name a type
int n, m;
^
0_0_29214923_15435.cpp:5:6: error: cannot declare reference to 'void'
void getNext()
^
0_0_29214923_15435.cpp:5:6: error: variable or field 'nbsp' declared void
0_0_29214923_15435.cpp: In function 'int getNext()':
0_0_29214923_15435.cpp:9:29: error: 'nbsp' declared as reference but not initialized
int i, j;
^
0_0_29214923_15435.cpp:9:34: error: 'i' was not declared in this scope
int i, j;
^
0_0_29214923_15435.cpp:9:42: error: 'j' was not declared in this scope
int i, j;
^
0_0_29214923_15435.cpp:10:32: error: expected primary-expression before '=' token
i = 0;
^
0_0_29214923_15435.cpp:11:32: error: expected primary-expression before '=' token
j = -1;
^
0_0_29214923_15435.cpp:12:25: error: 'next' was not declared in this scope
next[0] = -1;
^
0_0_29214923_15435.cpp:12:38: error: expected primary-expression before '=' token
next[0] = -1;
^
0_0_29214923_15435.cpp:13:37: error: expected ')' before ';' token
while(i < m)
^
0_0_29214923_15435.cpp:13:38: error: expected primary-expression before '<' token
while(i < m)
^
0_0_29214923_15435.cpp:13:45: error: 'm' was not declared in this scope
while(i < m)
^
0_0_29214923_15435.cpp:15:58: error: expected ')' before ';' token
if(j == -1 || b[i] == b[j]) ///如果可以匹配,都加一进行下一轮匹配
^
0_0_29214923_15435.cpp:15:59: error: expected primary-expression before '==' token
if(j == -1 || b[i] == b[j]) ///如果可以匹配,都加一进行下一轮匹配
^
0_0_29214923_15435.cpp:15:75: error: expected primary-expression before '||' token
if(j == -1 || b[i] == b[j]) ///如果可以匹配,都加一进行下一轮匹配
^
0_0_29214923_15435.cpp:15:83: error: 'b' was not declared in this scope
if(j == -1 || b[i] == b[j]) ///如果可以匹配,都加一进行下一轮匹配
^
0_0_29214923_15435.cpp:15:93: error: expected primary-expression before '==' token
if(j == -1 || b[i] == b[j]) ///如果可以匹配,都加一进行下一轮匹配
^
0_0_29214923_15435.cpp:19:86: error: expected primary-expression before '=' token
next[i] = j;
^
0_0_29214923_15435.cpp:22:49: error: 'else' without a previous 'if'
else j = next[j]; ///如果不能匹配,就退回到next[j];
^
0_0_29214923_15435.cpp:22:66: error: expected primary-expression before '=' token
else j = next[j]; ///如果不能匹配,就退回到next[j];
^
0_0_29214923_15435.cpp: At global scope:
0_0_29214923_15435.cpp:26:5: error: redefinition of 'int& nbsp'
int KMP_Index()
^
0_0_29214923_15435.cpp:2:5: note: 'int& nbsp' previously declared here
int a[1000010], b[10010];
^
0_0_29214923_15435.cpp: In function 'int KMP_Index()':
0_0_29214923_15435.cpp:28:29: error: 'nbsp' declared as reference but not initialized
int i = 0, j = 0;
^
0_0_29214923_15435.cpp:28:34: error: 'i' was not declared in this scope
int i = 0, j = 0;
^
0_0_29214923_15435.cpp:28:41: error: expected primary-expression before '=' token
int i = 0, j = 0;
^
0_0_29214923_15435.cpp:28:56: error: 'j' was not declared in this scope
int i = 0, j = 0;
^
0_0_29214923_15435.cpp:28:63: error: expected primary-expression before '=' token
int i = 0, j = 0;
^
0_0_29214923_15435.cpp:31:37: error: expected ')' before ';' token
while(i < n && j < m)
^
0_0_29214923_15435.cpp:31:38: error: expected primary-expression before '<' token
while(i < n && j < m)
^
0_0_29214923_15435.cpp:31:45: error: 'n' was not declared in this scope
while(i < n && j < m)
^
0_0_29214923_15435.cpp:31:54: error: expected identifier before '&' token
while(i < n && j < m)
^
0_0_29214923_15435.cpp:31:67: error: expected primary-expression before '<' token
while(i < n && j < m)
^
0_0_29214923_15435.cpp:31:74: error: 'm' was not declared in this scope
while(i < n && j < m)
^
0_0_29214923_15435.cpp:33:58: error: expected ')' before ';' token
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:33:59: error: expected primary-expression before '==' token
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:33:75: error: expected primary-expression before '||' token
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:33:83: error: 'a' was not declared in this scope
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:33:93: error: expected primary-expression before '==' token
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:33:101: error: 'b' was not declared in this scope
if(j == -1 || a[i] == b[j])
^
0_0_29214923_15435.cpp:38:49: error: 'else' without a previous 'if'
else j = next[j];
^
0_0_29214923_15435.cpp:38:66: error: expected primary-expression before '=' token
else
|