0

I know posting the while code is not cool, but I frankly can't figure out what is wrong anymore. I should have done this with something easier than trie-structure, but since it is close to done I'd rather not start from the scratch.

When I try to run the program, I get seg fault. Valgrind errors are invalid read size of 8 on lines 87, 89, 92.

The actual code:

http://pastebin.com/XbTvzBGA

0

What do those three lines have in common? current->children[index]. We'll have to assume that children is an array of node pointers. So each member of the array should be allocated to accommodate a node pointer (which not coincidentally would be 8).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .