Пример #1
0
void Menu()
{
	int val,choice,newVal;
	Treap myTreap;
	while(true)
	{
	do
	{
	cout<<"&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"<<endl;
	cout<<"       1.插入"<<endl;
	cout<<"       2.删除"<<endl;
	cout<<"       3.修改"<<endl;
	cout<<"       4.查找"<<endl;
	cout<<"       5.显示"<<endl;
	cout<<"       6.返回"<<endl;
	cout<<"请输入你的选项[ ]\b\b";
	cin>>choice; 
	}while(choice!=1&&choice!=2&&choice!=3&&choice!=4&&choice!=5&&choice!=6);
	if(1==choice)
	{
		cin>>val;
		myTreap.InsertTreap(val);
	}
	else if(2==choice)