F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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]);
                         ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2025-02-19 02:05:25, Gzip enabled