I have this tree I’m trying to work with.. I have it currently as
class TRIE {
char letter;
int isWord;
TRIE *children [MAX_CHILDREN];
};
what I’m confused about is declaring an array of the same type within the class.. will this work? Or how do I change it to make it correct? (it’s a tree type of class.. so the array will be filled with children nodes)
Yes. This will work. Since you are declaring a array of pointers to TRIE.