順序棧和鏈棧的壓棧以及出棧(實驗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];
相關文章
相關標籤/搜索