Question
C++: Open two input files and one output file. Input files: unsorted_dictionary.txt - this file contains 16000 words keywords.txt - this file contains 84 words
C++:
Open two input files and one output file.
Input files:
unsorted_dictionary.txt - this file contains 16000 words
keywords.txt - this file contains 84 words
Read in these two files and store their contents in 2 arrays of strings. Do not use a vector.
Sort both arrays using either a selection sort, bubble sort or an insertion sort. Use the same sort function for sorting both arrays. Do not use the STL sort algorithm or quick sort.
Search the dictionary array for each keyword. If the keyword is not present in the dictionary array, write a message to the output file that the keyword is not found in the dictionary (see sample output below). Count the number of keywords not found. You will print this number at the end of the program.
Sample output:
keyword not found: alignas keyword not found: alignof keyword not found: and_eq keyword not found: asm keyword not found: bitand keyword not found: bitor keyword not found: char16_t keyword not found: char32_t keyword not found: compl keyword not found: const_cast
... words not found: 23
okay so for the text files since they are huge just write to text file like put anything in them and i'll try them with the regular file here.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started