📄 main.cpp
字号:
#include"avltree.h"
void main()
{
try
{
AVLtree<int> s;
cout<<"'I' stand for insert ,'D' stand for delete!"<<endl;
char q;
do
{
cout<<"please select ?I/D"<<endl;
cin>>q;
if(q=='i')
{
int m;
cout<<"please enter the data you want to insert!"<<endl;
cin>>m;
s.Insert(m);
cout<<"the tree is:"<<endl;
s.output();
}
else if(q=='d')
{
int n;
cout<<"please enter the data you want to delete!"<<endl;
cin>>n;
s.Delete(n);
s.output();
}
}while(q!='q');
}
catch(...){}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -