栈的数组模拟(非STL)

#include<bits/stdc++.h>
using namespace std;
struct zhan{
      int s[10000];
      int top=0;
      void zhanpop(){//将栈顶弹出 
	      top--;
      }
      void zhanpush(int n){//将数据读入栈 
	      top++;
	      a[top]=n;
      }       
      int zhanempty(){//检查栈是否为空 
	      return top==0;
      }
      void chushihua(){//初始化栈 
      	      top=0;
      }
      int ding(){//取栈顶值 
	      return a[top];
      }
}
int main(){
	
}
原文地址:https://www.cnblogs.com/heqizheng/p/zhandeshuzumoni.html