I'm implementing a trie for pset6.
load works properly as far as I can tell. (gdb, valgrind both fine with it, and the #of words loaded comes out right as well).
check, however, generates a segmentation fault at the line:
if (current->child[i] == NULL)
Now, I've initialized
node* root and
node* current globally (to 0), as well as the node structure, and then within
load (which calls before
check) I malloc them. When the program gets to
current) don't seem to have values in them anymore. I thought the point of declaring them globally was so the values would persist and not disappear. How can I get the values for
root to persist into the