Project: Spell Checker
Write a spell checking program. The program should take two filenames on the command line. The first is the file containing correctly spelled dictionary words (one per line). The second is the text file to check. The program should print misspelled words one per line without duplicates to the console.
See Webster's Second International for a file that contains US English words (235k words from 1934 edition) or the open source file [[English Words]] on GitHub (466k words). You can download ebooks in text format from [[Project Gutenberg]] to test your spell checker.
Output
$ g++ -std=c++17 SpellChecker.cpp -o SpellChecker -lfmt
$ ./SpellChecker ../../data/text/EnglishWords.txt ../../data/text/GettysburgAddress.txt
1863
19
$ g++ -std=c++17 SpellChecker.cpp -o SpellChecker -lfmt
$ ./SpellChecker ../../data/text/EnglishWords.txt ../../data/text/USConstitution.txt
1
10
11th
12th
13th
14th
15th
16th
17th
18th
...
4
5
6
7
8
9
brearley
cotesworth
fitzsimons
spaight
$ g++ -std=c++17 SpellChecker.cpp -o SpellChecker -lfmt
$ ./SpellChecker ../../data/text/EnglishWords.txt ../../data/text/100.txt
0
00
000
01
02
03
04
05
08
1
...
ycliped
yead
yedward
yicld
yoketh
yongrey
yorkists
youtli
zir
zwagger