顺序栈和链栈的压栈以及出栈(实验2T1)

顺序栈: #include<iostream> using namespace std; const int StackSize=10; class SeqStack { public: SeqStack(){top=-1;} ~SeqStack(){} void Push(int x); int Pop(); int GetTop() {if(top!=-1) return data[top];
相关文章
相关标签/搜索