#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
string filename;
// Get the filename.
cout << "Enter the file you wish to have searched:\n";
cin >> filename;
// Open file.
ifstream file(filename.c_str());
// Read in all the words.
string word;
/////??? search for matches lexicographically ????///////////
Now after this, I'm not sure what to do. My teacher wants me to search for matches lexicographically but I don't know how to do that. Could anyone please offer help on how to search for word matches lexicographically. Then I will be outputting the top 50 most used words after finding these matches lexicographically.

New Topic/Question
Reply




MultiQuote






|