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