Question
Write a program in C ++ to scan one or more text files and count the number of occurrences of each word in those files
Write a program in C++ to scan one or more text files and count the number of occurrences of each word in those files Use a binary tree to keep track of all words. Your tree should be self-balancing using either AVL, Splay, or Red-Black tree algorithms to maximize efficiency. When all input files have been scanned, print out the results to another file.
Outcomes
After successfully completing this non-trivial program in C++, you should be able to:
Define a class of objects and operations on those objects.
Build a massive, recursive data structure comprising those objects.
Search for an item in that data structure and, if it is not found, add it to the structure.
Create a file for your output and write to it.
This Assignment
Your program must accept an indeterminate number of arguments on the command line, the first of which specifies the output file and the remaining of which specify the input files. Thus, a user could invoke your program in a Windows Command Prompt by typing
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