正在加载图片...
public Stack(int Sz=10 /构造函数 Stack (i delete [elements; void Push(e x 进栈 int Pop(& x) ∥/出栈 int getTop(E&x);∥取栈顶 void make Empty(){top=-1;}∥空栈 int Is Empty const return top ==-1; 3 int IsFull ( const freturn top=-maxSize-1; 5public: Stack (int sz = 10); //构造函数 ~Stack ( ) { delete [ ] elements; } void Push (E x); //进栈 int Pop (E& x); //出栈 int getTop (E& x); //取栈顶 void makeEmpty ( ) { top = -1; } //置空栈 int IsEmpty ( ) const { return top == -1; } int IsFull ( ) const { return top == maxSize-1; } } 5
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有