Question: C++ please. I am trying to write a function that would find a word in a dictionary that I upload. I understand that more information

C++ please. I am trying to write a function that would find a word in a dictionary that I upload. I understand that more information is needed for the specific code, but I would appreciate help in writing the foundations of the function, so that I would be able to change it a bit and make it work to find words in any dictionary

Read in the dictionary words into an array, and allow looking up a dictionary word. The filename in your program must be called "dictionary.txt" and it contains 3000 words of length >= 3. Running this part of your program should look like what is shown below. The number of words of size >= 3 can be hard-coded into your program. Having this number right will help ensure you've read in the dictionary correctly.

 

3000 words of size >= 3 were read in from dictionary. Choose from the following options: 1. Lookup dictionary word

2. Exit

Output example:

choice--> 1

Enter a word to be looked up in dictionary: hello hello IS in the dictionary.

Running it again could look like:

3000 words of size >= 3 were read in from dictionary. Choose from the following options: 1. Lookup dictionary word 2. Exit Your choice: 1 Enter a word to be looked up in dictionary: dogs dogs is NOT in the dictionary.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!