0_0_20129450_3846.cpp:4:7: error: 'N' was not declared in this scope
int s[N];
^
0_0_20129450_3846.cpp:5:7: error: 'N' was not declared in this scope
int p[N];
^
0_0_20129450_3846.cpp:6:10: error: 'N' was not declared in this scope
int next[N];
^
0_0_20129450_3846.cpp: In function 'void getnext()':
0_0_20129450_3846.cpp:10:30: error: ISO C++ forbids applying 'sizeof' to an expression of function type [-fpermissive]
memset(next,0,sizeof(next));
^
0_0_20129450_3846.cpp:10:31: error: cannot resolve overloaded function 'next' based on conversion to type 'void*'
memset(next,0,sizeof(next));
^
0_0_20129450_3846.cpp:11:11: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
next[0]=-1;
^
0_0_20129450_3846.cpp:13:19: error: 'p' was not declared in this scope
if(k==-1||p[j]==p[k]) {
^
0_0_20129450_3846.cpp:16:19: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
next[j]=k;
^
0_0_20129450_3846.cpp:18:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
k=next[k];
^
0_0_20129450_3846.cpp: In function 'int kmp()':
0_0_20129450_3846.cpp:25:19: error: 's' was not declared in this scope
if(j==-1||s[i]==p[j]) {
^
0_0_20129450_3846.cpp:25:25: error: 'p' was not declared in this scope
if(j==-1||s[i]==p[j]) {
^
0_0_20129450_3846.cpp:29:21: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
j=next[j];
^
0_0_20129450_3846.cpp: In function 'int main()':
0_0_20129450_3846.cpp:41:25: error: 's' was not declared in this scope
scanf("%d",&s[i]);
^
0_0_20129450_3846.cpp:43:25: error: 'p' was not declared in this scope
scanf("%d",&p[i]);
^
|