/* TopListClass Class Demonstration program  */

#include <iostream.h>
#include <lvpstring.h>
#include <toplist.h>
//#include <lvp\bool.h>

using namespace std;	// October 5, 2001

int main()
{
	TopListClass DemoList("samplist.dat");
	DemoList.Display(cout);    // Display current scores to console

	lvpstring Name;
	const lvpstring Sentinel = "END";
	long Score;
	while (true) {
		cout << "Enter your name (" << Sentinel << " to end): ";
		getline(cin, Name);
		if (Name == Sentinel)
			break;
		cout << "Enter your score: ";
		cin >> Score;
		cin.ignore(80, '\n');
		DemoList.AddItem(Score, Name);
		DemoList.Display(cout);
	}
	return(0);
}

