From 36a46d1a7f08e24fc4dedc6cc08d7a6957b4b111 Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 28 Apr 2024 22:30:24 +0000 Subject: Sun, Apr 28, 2024, 3:30 PM -07:00 --- wk5/pset/speller/dictionary.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'wk5/pset/speller/dictionary.c') 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 -- cgit v1.2.3