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_19484495_16272.cpp: In constructor 'TrieNode::TrieNode()':
0_0_19484495_16272.cpp:18:33: error: array bound forbidden after parenthesized type-id
         childs = new (TrieNode*)[SIZE];
                                 ^
0_0_19484495_16272.cpp:18:33: note: try removing the parentheses around the type-id
0_0_19484495_16272.cpp: In member function 'void StringPattern::add_pattern(const string&)':
0_0_19484495_16272.cpp:14:16: error: 'TrieNode** TrieNode::childs' is private
     TrieNode **childs;
                ^
0_0_19484495_16272.cpp:44:22: error: within this context
             if (now->childs[pattern[i] - BASE] == nullptr) {
                      ^
0_0_19484495_16272.cpp:14:16: error: 'TrieNode** TrieNode::childs' is private
     TrieNode **childs;
                ^
0_0_19484495_16272.cpp:45:22: error: within this context
                 now->childs[pattern[i] - BASE] = new TrieNode();
                      ^
0_0_19484495_16272.cpp:14:16: error: 'TrieNode** TrieNode::childs' is private
     TrieNode **childs;
                ^
0_0_19484495_16272.cpp:47:24: error: within this context
             now = now->childs[pattern[i] - BASE];
                        ^
0_0_19484495_16272.cpp:13:9: error: 'int TrieNode::cnt' is private
     int cnt;
         ^
0_0_19484495_16272.cpp:48:18: error: within this context
             now->cnt++;
                  ^
0_0_19484495_16272.cpp:50:14: error: 'class TrieNode' has no member named 'is_terminal'
         now->is_terminal = true;
              ^
0_0_19484495_16272.cpp: In member function 'int StringPattern::match(const string&) const':
0_0_19484495_16272.cpp:54:29: error: 'pattern' was not declared in this scope
         for (int i = 0; i < pattern.length(); ++i) {
                             ^
0_0_19484495_16272.cpp:14:16: error: 'TrieNode** TrieNode::childs' is private
     TrieNode **childs;
                ^
0_0_19484495_16272.cpp:55:22: error: within this context
             if (now->childs[pattern[i] - BASE] == nullptr) {
                      ^
0_0_19484495_16272.cpp:14:16: error: 'TrieNode** TrieNode::childs' is private
     TrieNode **childs;
                ^
0_0_19484495_16272.cpp:58:24: error: within this context
             now = now->childs[pattern[i] - BASE];
                        ^
0_0_19484495_16272.cpp:13:9: error: 'int TrieNode::cnt' is private
     int cnt;
         ^
0_0_19484495_16272.cpp:60:21: error: within this context
         return now->cnt;
                     ^
0_0_19484495_16272.cpp: In function 'int main()':
0_0_19484495_16272.cpp:69:14: error: request for member 'add_pattern' in 'trie', which is of non-class type 'StringPattern()'
         trie.add_pattern(pattern);
              ^
0_0_19484495_16272.cpp:73:22: error: request for member 'match' in 'trie', which is of non-class type 'StringPattern()'
         cout << trie.match(buffer) << endl;
                      ^


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-06-29 15:28:41, Gzip enabled