范宽溪山行旅图落款:运算结果(用数组栈)
来源:百度文库 编辑:查人人中国名人网 时间:2024/05/14 06:21:04
很重要!很急!谢谢各位!baituo !
#include<iostream.h>
int base[100];
int size=0;
void push(int a)//入栈
{
base[size++]=a;
}
int pop()//出栈
{
return base[--size];
}
int main()
{
push(3);
push(4);
cout<<pop()<<endl;
cout<<pop()<<endl;
system("pause");
}