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_29215009_26207.cpp:2:6: error: expected nested-name-specifier before '&' token
 using namespace std;
      ^
0_0_29215009_26207.cpp:2:21: error: expected identifier before '&' token
 using namespace std;
                     ^
0_0_29215009_26207.cpp:2:26: error: expected constructor, destructor, or type conversion before ';' token
 using namespace std;
                          ^
0_0_29215009_26207.cpp:2:27: error: 'std' does not name a type
 using namespace std;
                           ^
0_0_29215009_26207.cpp:3:6: error: 'nbsp' declared as reference but not initialized
 char W[10010], T[1000010];
      ^
0_0_29215009_26207.cpp:3:11: error: 'W' does not name a type
 char W[10010], T[1000010];
           ^
0_0_29215009_26207.cpp:3:26: error: 'T' does not name a type
 char W[10010], T[1000010];
                          ^
0_0_29215009_26207.cpp:4:5: error: conflicting declaration 'int& nbsp'
 int wlen, tlen;
     ^
0_0_29215009_26207.cpp:3:6: note: previous declaration as 'char& nbsp'
 char W[10010], T[1000010];
      ^
0_0_29215009_26207.cpp:4:10: error: 'wlen' does not name a type
 int wlen, tlen;
          ^
0_0_29215009_26207.cpp:4:21: error: 'tlen' does not name a type
 int wlen, tlen;
                     ^
0_0_29215009_26207.cpp:5:5: error: conflicting declaration 'int& nbsp'
 int next[10010];
     ^
0_0_29215009_26207.cpp:3:6: note: previous declaration as 'char& nbsp'
 char W[10010], T[1000010];
      ^
0_0_29215009_26207.cpp:5:10: error: 'next' does not name a type
 int next[10010];
          ^
0_0_29215009_26207.cpp:6:6: error: cannot declare reference to 'void'
 void getNext()
      ^
0_0_29215009_26207.cpp:6:6: error: variable or field 'nbsp' declared void
0_0_29215009_26207.cpp: In function 'int getNext()':
0_0_29215009_26207.cpp:8:29: error: 'nbsp' declared as reference but not initialized
     int i, j;
                             ^
0_0_29215009_26207.cpp:8:34: error: 'i' was not declared in this scope
     int i, j;
                                  ^
0_0_29215009_26207.cpp:8:42: error: 'j' was not declared in this scope
     int i, j;
                                          ^
0_0_29215009_26207.cpp:9:32: error: expected primary-expression before '=' token
     i = 0;
                                ^
0_0_29215009_26207.cpp:10:32: error: expected primary-expression before '=' token
     j = -1;
                                ^
0_0_29215009_26207.cpp:11:25: error: 'next' was not declared in this scope
     next[0] = -1;
                         ^
0_0_29215009_26207.cpp:11:25: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algobase.h:66:0,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/char_traits.h:39,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ios:40,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/istream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/sstream:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/complex:45,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/ccomplex:38,
                 from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:52,
                 from 0_0_29215009_26207.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_iterator_base_funcs.h:184:5: note:   'std::next'
     next(_ForwardIterator __x, typename
     ^
0_0_29215009_26207.cpp:11:38: error: expected primary-expression before '=' token
     next[0] = -1;
                                      ^
0_0_29215009_26207.cpp:12:37: error: expected ')' before ';' token
     while(j < wlen)
                                     ^
0_0_29215009_26207.cpp:12:38: error: expected primary-expression before '<' token
     while(j < wlen)
                                      ^
0_0_29215009_26207.cpp:12:45: error: 'wlen' was not declared in this scope
     while(j < wlen)
                                             ^
0_0_29215009_26207.cpp:14:58: error: expected ')' before ';' token
         if(j == -1 || W[i] == W[j])
                                                          ^
0_0_29215009_26207.cpp:14:59: error: expected primary-expression before '==' token
         if(j == -1 || W[i] == W[j])
                                                           ^
0_0_29215009_26207.cpp:14:75: error: expected primary-expression before '||' token
         if(j == -1 || W[i] == W[j])
                                                                           ^
0_0_29215009_26207.cpp:14:83: error: 'W' was not declared in this scope
         if(j == -1 || W[i] == W[j])
                                                                                   ^
0_0_29215009_26207.cpp:14:93: error: expected primary-expression before '==' token
         if(j == -1 || W[i] == W[j])
                                                                                             ^
0_0_29215009_26207.cpp:18:86: error: expected primary-expression before '=' token
             next[i] = j;
                                                                                      ^
0_0_29215009_26207.cpp:20:49: error: 'else' without a previous 'if'
         else j = next[j];
                                                 ^
0_0_29215009_26207.cpp:20:66: error: expected primary-expression before '=' token
         else j = next[j];
                                                                  ^
0_0_29215009_26207.cpp: At global scope:
0_0_29215009_26207.cpp:23:5: error: conflicting declaration 'int& nbsp'
 int KMP_count()
     ^
0_0_29215009_26207.cpp:3:6: note: previous declaration as 'char& nbsp'
 char W[10010], T[1000010];
      ^
0_0_29215009_26207.cpp: In function 'int KMP_count()':
0_0_29215009_26207.cpp:25:29: error: 'nbsp' declared as reference but not initialized
     int ans = 0;
                             ^
0_0_29215009_26207.cpp:25:34: error: 'ans' was not declared in this scope
     int ans = 0;
                                  ^
0_0_29215009_26207.cpp:25:43: error: expected primary-expression before '=' token
     int ans = 0;
                                           ^
0_0_29215009_26207.cpp:26:29: error: redeclaration of 'int& nbsp'
     int i, j = 0;
                             ^
0_0_29215009_26207.cpp:25:29: note: 'int& nbsp' previously declared here
     int ans = 0;
                             ^
0_0_29215009_26207.cpp:26:34: error: 'i' was not declared in this scope
     int i, j = 0;
                                  ^
0_0_29215009_26207.cpp:26:42: error: 'j' was not declared in this scope
     int i, j = 0;
                                          ^
0_0_29215009_26207.cpp:26:49: error: expected primary-expression before '=' token
     int i, j = 0;
                                                 ^
0_0_29215009_26207.cpp:27:28: error: 'wlen' was not declared in this scope
     if(wlen == 1 && tlen == 1)
                            ^
0_0_29215009_26207.cpp:27:37: error: expected ')' before ';' token
     if(wlen == 1 && tlen == 1)
                                     ^
0_0_29215009_26207.cpp:27:38: error: expected primary-expression before '==' token
     if(wlen == 1 && tlen == 1)
                                      ^
0_0_29215009_26207.cpp:27:55: error: expected identifier before '&' token
     if(wlen == 1 && tlen == 1)
                                                       ^
0_0_29215009_26207.cpp:27:61: error: 'tlen' was not declared in this scope
     if(wlen == 1 && tlen == 1)
                                                             ^
0_0_29215009_26207.cpp:27:71: error: expected primary-expression before '==' token
     if(wlen == 1 && tlen == 1)
                                                                       ^
0_0_29215009_26207.cpp:27:80: error: expected ';' before ')' token
     if(wlen == 1 && tlen == 1)
 


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-29 20:29:40, Gzip enabled