#include
#include
using namespace std;
int main()
{
std::ios::sync_with_stdio(false);
//cin.tie(NULL);
stack s;
int choice,e;
while(true)
{
cout<<"1.判断栈是否为空\n"
"2.栈中元素个数\n"
"3.删除栈顶元素\n"
"4.输出栈顶元素\n"
"5.插入元素\n";
cin>>choice;
switch(choice)
{
case 1:cout<<(s.empty()?"空\n":"不空\n");break;
case 2:cout<<"元素个数为:"<>e;s.push(e);cout<<"插入成功\n";break;
default:cout<<"输入错误,请重新输入!\n";
}
}
return 0;
}
/************************************************
* 小柳学渣
* 2019/1/22 19:34
************************************************/