首页 > 代码库 > stack(STL)
stack(STL)
//Stack STL//在STL中,栈是以别的容器作为底部结构,再将//接口改变,使之符合栈的特性//一共5个常用操作函数//构造析构stack<Elem>c; //build a empty stackstack<Elem>c1(c2); //copy a stack//5 functionsc.top(); //return the element at the top of the stackc.push(elem); //push element at the topc.pop(); //pop element at the topc.empty();c.size(); //return the size of the stack//Stack is just a encapsulation of other container.//It just supply its own interfaces.//Elements are pushed/popped from the "back" of the specific container, which is //known as the top of the stack.
stack(STL)
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。