Question: This is Task A for a c++ project where I have to make a dictionary text file and write a c++ program to read the

This is Task A for a c++ project where I have to make a dictionary text file and write a c++ program to read the file. This is the info given for task A but I don't understand whats supposed to be in the .cpp file that I submit.

This is Task A for a c++ project where I have to

make a dictionary text file and write a c++ program to read

the file. This is the info given for task A but I

A regular dictionary contains the words and the definitions. In addition to the words and the definitions, we will also store the part-of-speech (pos). The words, definitions and pos are going to be stored in Arrays. Use these global-variables in your code outside main() function: const int g_MAX_WORDS =1000; int g_word_count =0; string g_words[g_MAX_WORDS] ; string g_definitions[g_MAX_WORDS]; string g_pos[g_MAX_WORDS] ; Create a C++ file and add the following function: Here's an example text file: WORD POS : DEFINITION Grumpy Adjective : bad-tempered and irritable Professor Noun : a teacher of the highest rank in a college or university Does Verb : perform (an action, often of unspecified nature) Nothing Adverb : not at all Example: Calling readWords () on the above text file will modify the global variables like this: g_MAX_WORDS: 1000 g_word_count: 5 g_words: ["WORD", "Grumpy", "Professor", "Does", "Nothing"] g_pos: ["P0S", "Adjective", "Noun", "Verb", "Adverb"] g_definitions: [ "DEFINITION", "bad-tempered and irritable", "a teacher of the highest rank in a college or university", "perform (an action, often of unspecified nature)", "not at all" ] Make sure your program produces the correct output by testing the function and global-variables using function. Note: Only submit single file to gradescope. Remove or comment out the main function from your code before submitting it on gradescope. Otherwise, the autograder will fail

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To complete your task you need to create a C program that reads a dictionary from a text file and stores the words parts of speech and definitions int... View full answer

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!