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**
}
Here :i am having a runtime error.. to me its seems to be correct ..I have no idea whats wrong with it. Any help would be of Great Use to me :) Thank you