#include #include #include using namespace std; #include "sortbench.h" #include "sortall.h" #include "prompt.h" int main() { typedef SortWrapper Wstring; string word, filename = PromptString("filename:"); ifstream input(filename.c_str()); tvectorlist; while (input >> word) { list.push_back(Wstring(word)); } cout << "# words read =\t " << list.size() << endl; Wstring::clear(); // clear push_back assigns SelectSort(list,list.size()); cout << "# compares\t = " << Wstring::compareCount() << endl; cout << "# assigns\t = " << Wstring::assignCount() << endl; return 0; }