diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 23:48:21 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-14 23:48:21 +0000 |
commit | c2506942fdfd43c779c15b23c7ba3afdcc216d6b (patch) | |
tree | 3e27e509ef56ebcc82a26892a1fb03df14248d1d /wk5/pset/speller/dictionary.c | |
parent | e06adfcd94b39041c59f1bb2263de28012810c6a (diff) |
Sun, Apr 14, 2024, 4:48 PM -07:00
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 509844d..8625d73 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -36,7 +36,15 @@ unsigned int hash(const char *word) bool load(const char *dictionary) { // TODO - return fopen(dictionary, "r"); + FILE *file = fopen(dictionary, "r"); + if (file != NULL) + { + return true; + } + else + { + return false; + } } // Returns number of words in dictionary if loaded, else 0 if not yet loaded |