When I ran the above code I got this error message 3 times.
bool strLesser(const std::string &elem1, const std::string &elem2) const
return elem2.size() > elem1.size();
// Alphabetical sort first
// Remove duplicates
// Character count sort
std::stable_sort(WordList.begin(), WordList.end(), strLesser);
I even tried using sort instead of stable_sort but I got even more error messages. I can't figure out where that error is coming from; when I clicked on it it took me to the sort generic algorithm so that didn't help there. Thanks for the help.
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\algorithm(1591): error C2064: term does not evaluate to a function taking 2 arguments
My mistake, when I posted this earlier I mistyped the the wordlist as vector. Anyways, I get the errors above with a list still.