Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE OF C++ PROGRAM THANK YOU VERY MUCH. int main() { ifstream infile; infile.open(dictionary_four_letter_words.txt); string inp = s; while (inp != 1) { cout cin

USE OF C++ PROGRAM THANK YOU VERY MUCH.

image text in transcribed

int main()

{

ifstream infile;

infile.open("dictionary_four_letter_words.txt");

string inp = "s";

while (inp != "1")

{

cout

cin >> inp;

if (inp == "1")

{

break;

}

if (checkIfPresent(inp))

{

cout

}

else

{

cout

}

}

}

bool checkIfPresent(string word)

{

ifstream infile;

infile.open("dictionary_four_letter_words.txt");

if (!infile.eof())

{

string line;

while (getline(infile, line))

{

if (line == word)

{

return 0;

}

}

}

infile.close();

}

This is my working but not when I type the character it is always say the spell correctly, even I type the numbers. so can any one willing to help thank you very much

Program 5. Spell Checker Write a program that employs the four letter word dictionary to check the spelling of an input word (test word). You will need to save the dictionary file (Located on the Data Canvas Page) to a folder on your computer. For this program you will prompt the user to enter a four letter word (or four characters). Then using a loop read each word from the dictionary and compare it to the input test word. If there is a match then you have spellchecked the word. Write a message to the screen indicating that the word was spelled correctly. If you do not find the word in the dictionary (no match) then write a message to the screen indicating that the test word is not spelled correctly. Show output for the following test words: birdake zoom, and xxyt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

LO1 Explain how the workforce is changing in unpredicted ways.

Answered: 1 week ago

Question

LO6 List the components of job descriptions.

Answered: 1 week ago