【发布时间】:2015-11-17 22:40:37
【问题描述】:
class node {
public:
node(){
value = 0;
arr = new node*[26];
for(int i =0 ; i<26;i++)
arr[i]= NULL;
}
int value;
node ** arr ;
};
class trie {
public:
trie(){
root = NULL;
}
node * root;
int count;
};
int main(){
string A[5] = {"apple, ball , bat , cat, car"};
trie* too;
node *p = new node();
too->root = p; // **here**
}
这里:我遇到了运行时错误.. 对我来说它似乎是正确的..我不知道它有什么问题。任何帮助对我都有很大用处:)谢谢
【问题讨论】:
标签: c++ data-structures trie