Hot answers tagged

1

One question: is trav null at that point? If it is, trav->word doesn't exist. That will cause a seg fault. Kudos for trying to do a trie, but this isn't that. A trie uses a node structure that records the address of the next node and a flag that says whether the current node is the end of a word, i.e., isWord. Nowhere does this code mark the end of ...


Only top voted, non community-wiki answers of a minimum length are eligible