C++实现顺序栈(数据结构)

时间:2022-11-14 15:10:21
【文件属性】:
文件名称:C++实现顺序栈(数据结构)
文件大小:148B
文件格式:ZIP
更新时间:2022-11-14 15:10:21
栈 顺序栈 数据结构 c++  本程序通过C++实现数据结构中顺序栈,主要功能有压栈、弹栈、遍历、栈空间拓展等,具体功能函数如下: MStack(int tCapacity,bool& flag); ~MStack(); void Clear(); bool Empty() const; bool Push(ElemType&); bool Pop(ElemType&); bool GetTopElem(ElemType&) const; bool traverse(void(*visit)(const ElemType&)) const; int GetCapacity() const; template friend bool StackExpansion(MStack& CurStack, int newCapacity);//声明为友元

网友评论