Question: please use c++ language to solve this question, and write comments in the code, thank you! Here's the main function words.cpp: #include #include #include #include
please use c++ language to solve this question, and write comments in the code, thank you!


Here's the main function words.cpp:
#include
#include
#include
#include
#include "wordtree.h"
using namespace std;
int main() {
ifstream fin;
ofstream fout;
string filename;
cout
cin >> filename;
fin.open(filename.c_str());
if (fin.fail()) {
cout
exit(1);
}
cout
WordTree myTree;
// insert code here
fin.close();
fout.open("results.txt");
cout
cout
fout
cout
fout
cout
fout
fout.close();
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
