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_24821852_5401.cpp:4:7: error: 'wordLen' does not name a type
 const wordLen = 20;
       ^
0_0_24821852_5401.cpp:9:14: error: 'wordLen' was not declared in this scope
     int next[wordLen][128];
              ^
0_0_24821852_5401.cpp: In member function 'void Trie::init()':
0_0_24821852_5401.cpp:18:39: error: 'wordLen' was not declared in this scope
         memset(next, 0, sizeof(int) * wordLen*128);
                                       ^
0_0_24821852_5401.cpp: In member function 'void Trie::insert(char*)':
0_0_24821852_5401.cpp:30:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
             if (next[ptr][str[i]] == 0) {
                         ^
0_0_24821852_5401.cpp:31:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
                 next[ptr][str[i]] = cnt++;
                         ^
0_0_24821852_5401.cpp:33:27: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
             ptr = next[ptr][str[i]];
                           ^
0_0_24821852_5401.cpp: In member function 'int Trie::query(char*)':
0_0_24821852_5401.cpp:41:25: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
             if (next[ptr][str[i]] == 0)
                         ^
0_0_24821852_5401.cpp:43:27: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
             ptr = next[ptr][str[i]];
                           ^
0_0_24821852_5401.cpp: In function 'int main()':
0_0_24821852_5401.cpp:51:12: error: 'wordLen' was not declared in this scope
     char c[wordLen];
            ^
0_0_24821852_5401.cpp:52:24: error: 'c' was not declared in this scope
     while (~scanf("%s",c))
                        ^
0_0_24821852_5401.cpp:54:24: error: 'c' was not declared in this scope
     while (~scanf("%s",c))
                        ^


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-12-02 15:36:22, Gzip enabled