diff options
Diffstat (limited to 'wk5/pset')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 342f843..527abff 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -67,15 +67,16 @@ bool load(const char *dictionary) } // copy word from fscanf into node using strcpy strcpy(ptr->word, word); - hash(word); - ptr->next = + ptr->next = NULL; + int val = hash(word); + } /* use hash function function takes string and returns index insert node into hash table - HOW + for whatever hash index, go to end and put it there */ // Close the dictionary file |