Write a C++ Program that does spell checking.. We\'ve come to take spell checker
ID: 673368 • Letter: W
Question
Write a C++ Program that does spell checking..
We've come to take spell checkers for granted (and sometimes as a source of amusement!) but they address a non-trivial problem.
There are so many ways in which words can be misspelled:
not misspelled at all!
missing a letter but otherwise correct
having an extra letter but otherwise correct
having two adjacent letters reversed but otherwise correct
really really messed up (i.e. none of the above--you could add onto this list endlessly!)
Write a program which takes as its input a file containing one or more lines.
Each line has a number of attempts to spell a word. The first attempt is correct. Those following are not and should be classified according to the above list.
If a word is misspelled in more than one way, e.g. has both an extra letter and two letters are reversed, you may pick any of the ways it is misspelled.
Classify all the misspellings on each line, outputting the results to the console before moving on to the next line.
A sample file with one line has been provided to get you started.
Smaple file: spellcheck.txt
Explanation / Answer
#include #include #include #include string words; using namespace std; int main ( int argc, char *argv[] ) { if ( argc != 2 ) coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.