diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 22:30:24 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-28 22:30:24 +0000 |
commit | 36a46d1a7f08e24fc4dedc6cc08d7a6957b4b111 (patch) | |
tree | 31796d5436f370ca214a514edb2123c88341d067 /wk5/pset/speller/dictionary.c | |
parent | f035bf48b1ed43222a13509e8b4016060f1c9955 (diff) |
Sun, Apr 28, 2024, 3:30 PM -07:00
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-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 |