From 534e938e3bbc6096ee856293404c67cd9e55566e Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:41:16 +0000 Subject: Sun, Apr 28, 2024, 4:41 PM -07:00 --- wk5/pset/speller/dictionary.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 19be3d6..3a00555 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -20,7 +20,7 @@ const unsigned int N = 26; node *table[N]; // Size integer -int size = 0; +int siz = 0; // Returns true if word is in dictionary, else false bool check(const char *word) @@ -69,10 +69,10 @@ bool load(const char *dictionary) char word[LENGTH + 1]; // use fscanf(file, "%s", word) to grab words // check for ended file - while(fscanf(source, "%s", word) != "E0F") + while(fscanf(source, "%s", word) != E0F) { // update size int - size++; + siz++; // create new node // use malloc node *ptr = malloc(sizefo(node)); @@ -104,7 +104,7 @@ bool load(const char *dictionary) // Returns number of words in dictionary if loaded, else 0 if not yet loaded unsigned int size(void) { - return size; + return siz; } // Unloads dictionary from memory, returning true if successful, else false -- cgit v1.2.3