// Hello7.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream>
#include <string>
#include <set>
using std::cout;
using std::cin;
using std::endl;
using std::string;

int _tmain(int argc, _TCHAR* argv[])
{   string name , bill("bill");
    typedef std::set< string, std::less<string> > nameSet;
    nameSet allNames;	
	for (int i=0; i < 5; i++)
	{
		cout << "hello, please enter your name."<<endl;
		cin >>  name;
		allNames.insert(name);
		cout <<  "thanks " << name ;
		if (name == bill) { cout << " :-) ";}
		cout << endl;
		
	};
	nameSet::iterator theIterator;
	theIterator = allNames.begin();
	cout << "Summary of names"<<endl;
	for (int i=0; i<5; i++)
	{	cout << *theIterator << endl ;
	    ++theIterator;
	}
    cin >> name;

	
	return 0;
}


