diff options
Diffstat (limited to 'wk5/pset/speller/dictionary.c')
-rw-r--r-- | wk5/pset/speller/dictionary.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c index 695286a..27bbeaa 100644 --- a/wk5/pset/speller/dictionary.c +++ b/wk5/pset/speller/dictionary.c @@ -54,8 +54,14 @@ unsigned int size(void) { // TODO char c; - while (fread(&c, 1, 1, )) - return 0; + while (fread(&c, 1, 1, file)) + { + if (c == "\n") + { + n++; + } + } + return n; } // Unloads dictionary from memory, returning true if successful, else false |