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_36594119_28296.cpp:7:5: error: expected unqualified-id before '[' token
  int[][] tree = new int[maxn][26];
     ^
0_0_36594119_28296.cpp:8:5: error: expected unqualified-id before '[' token
  int[] len = new int[maxn];
     ^
0_0_36594119_28296.cpp:9:5: error: expected unqualified-id before '[' token
  int[] link = new int[maxn];
     ^
0_0_36594119_28296.cpp: In member function 'void demo::init(int)':
0_0_36594119_28296.cpp:16:3: error: 'link' was not declared in this scope
   link[1] = -1;
   ^
0_0_36594119_28296.cpp:19:4: error: 'len' was not declared in this scope
    len[i] = 0;
    ^
0_0_36594119_28296.cpp: In member function 'void demo::add(char)':
0_0_36594119_28296.cpp:27:3: error: 'len' was not declared in this scope
   len[now] = len[p] + 1;
   ^
0_0_36594119_28296.cpp:28:21: error: 'tree' was not declared in this scope
   for (; p != -1 && tree[p][off] == 0; p = link[p]) {
                     ^
0_0_36594119_28296.cpp:28:44: error: 'link' was not declared in this scope
   for (; p != -1 && tree[p][off] == 0; p = link[p]) {
                                            ^
0_0_36594119_28296.cpp:32:4: error: 'link' was not declared in this scope
    link[now] = 1;
    ^
0_0_36594119_28296.cpp:35:16: error: 'tree' was not declared in this scope
    int clash = tree[p][off];
                ^
0_0_36594119_28296.cpp:37:5: error: 'link' was not declared in this scope
     link[now] = clash;
     ^
0_0_36594119_28296.cpp:42:5: error: 'link' was not declared in this scope
     link[neww] = link[clash];
     ^
0_0_36594119_28296.cpp: In function 'int main()':
0_0_36594119_28296.cpp:58:7: error: expected unqualified-id before '.' token
   demo.init(s.size());
       ^
0_0_36594119_28296.cpp:61:25: error: request for member 'length' in 's', which is of non-class type 'char [200008]'
   for (int i = 0; i < s.length(); i++) {
                         ^
0_0_36594119_28296.cpp:62:8: error: expected unqualified-id before '.' token
    demo.add(s[i]);
        ^
0_0_36594119_28296.cpp:68:25: error: request for member 'length' in 's', which is of non-class type 'char [200008]'
   for (int i = 0; i < s.length(); i++) {
                         ^
0_0_36594119_28296.cpp:69:16: error: request for member 'charAt' in 's', which is of non-class type 'char [200008]'
    int off = s.charAt(i) - 'a';
                ^
0_0_36594119_28296.cpp:70:12: error: expected primary-expression before '.' token
    if (demo.tree[now][off] != 0) {
            ^
0_0_36594119_28296.cpp:72:15: error: expected primary-expression before '.' token
     now = demo.tree[now][off];
               ^
0_0_36594119_28296.cpp:76:27: error: expected primary-expression before '.' token
     for (; p != -1 && demo.tree[p][off] == 0; p = demo.link[p]);
                           ^
0_0_36594119_28296.cpp:76:55: error: expected primary-expression before '.' token
     for (; p != -1 && demo.tree[p][off] == 0; p = demo.link[p]);
                                                       ^
0_0_36594119_28296.cpp:82:16: error: expected primary-expression before '.' token
      len = demo.len[p] + 1;
                ^
0_0_36594119_28296.cpp:83:16: error: expected primary-expression before '.' token
      now = demo.tree[p][off];
                ^


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-26 06:24:10, Gzip enabled