C++ Write a program that checks the spelling of all words in a file. It should read each word of a file and check whether it is contained in a word list. A word list is available on most UNIX systems (including Linux and Mac OS X) in the file /usr/share/dict/words. (If you don’t have access to a UNIX system, you can find a copy of the file on the Internet by searching for /usr/share/dict/words.) The program should print out all words that it cannot find in the word list. Follow this pseudocode: Open the dictionary file. Define a vector of strings called words. For each word in the dictionary file Append the word to the words vector. Open the file to be checked. For each word in that file If the word is not contained in the words vector Print the word.
C++ Write a program that checks the spelling of all words in a file. It should read each word of a file and check whether it is contained in a word list. A word list is available on most UNIX systems (including Linux and Mac OS X) in the file /usr/share/dict/words. (If you don’t have access to a UNIX system, you can find a copy of the file on the Internet by searching for /usr/share/dict/words.) The program should print out all words that it cannot find in the word list. Follow this pseudocode:
Open the dictionary file.
Define a
For each word in the dictionary file
Append the word to the words vector.
Open the file to be checked.
For each word in that file
If the word is not contained in the words vector
Print the word.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images