From abec11b35b285b0b83435c26e1b06a780fe713b9 Mon Sep 17 00:00:00 2001 From: Imbus <> Date: Thu, 21 Nov 2024 09:49:35 +0100 Subject: [PATCH] Spell now behaves properly --- lab2/spell.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lab2/spell.cc b/lab2/spell.cc index 1d00838..38f0249 100644 --- a/lab2/spell.cc +++ b/lab2/spell.cc @@ -1,4 +1,5 @@ #include "dictionary.h" +#include #include #include #include @@ -31,11 +32,11 @@ int main() { Dictionary dict; string word; dict.slurp(std::filesystem::path("/usr/share/dict/words")); - dict.spit(std::filesystem::path("words.txt")); + // dict.spit(std::filesystem::path("words.txt")); - // while (cin >> word) { - // transform(word.begin(), word.end(), word.begin(), ::tolower); - // check_word(word, dict); - // } + while (cin >> word) { + std::transform(word.begin(), word.end(), word.begin(), ::tolower); + check_word(word, dict); + } return 0; }