Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write in C++ and briefly explain. Question 1 Write a ReadCorrectWords function to store all known, correct words for your spellchecker. It should have

Please write in C++ and briefly explain.

image text in transcribed

image text in transcribed

Question 1 Write a ReadCorrectWords function to store all known, correct words for your spellchecker. It should have the following parameters in the order provided a string filename an array of strings correctWords[] the size of the array an integer startlndex. Your function should return the total number of correct words in the array correctWords. Your function should open the file identified by filename and read lines from the file line by line. The file will have the following format: correctWords.txt chicken fish COW bubbles pear kiwi You can expect exactly one word on each line. Each word is a correct spelling and should be added to the correctWords array. The parameter startlndex is the index at which you should begin adding your words in the array. If I called your function with the file above and startlndex- 0, your correctWords array should look like this: ["chicken", "fish" "cow", "bubbles", "pear", "kiwi"] Your function should return 6 (for 6 words total in the array)

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

Describe a persuasive message.

Answered: 1 week ago

Question

Identify and use the five steps for conducting research.

Answered: 1 week ago

Question

List the goals of a persuasive message.

Answered: 1 week ago