stack(STL)
2024-10-15 13:38:37
//Stack STL
//在STL中,栈是以别的容器作为底部结构,再将
//接口改变,使之符合栈的特性
//一共5个常用操作函数 //构造析构
stack<Elem>c; //build a empty stack
stack<Elem>c1(c2); //copy a stack //5 functions
c.top(); //return the element at the top of the stack
c.push(elem); //push element at the top
c.pop(); //pop element at the top c.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.
最新文章
- 如何使用VS在SharePont 2013中插入ashx文件
- 【TYVJ1864】[Poetize I]守卫者的挑战 概率与期望
- jqxComboBox
- 当java出现异常,应如何进行处理
- Linux中查看各文件夹大小命令du -h --max-depth=1
- 20145222黄亚奇《Java程序设计》实验五实验报告
- JBPM TaskInstance 对象创建过程
- 夺命雷公狗---Thinkphp----9之中间层的创建,防止跨目录访问
- [GIF] GIF Loop Coder Single Mode
- BigRender
- [转] java中的匿名内部类总结
- 路由器的nat模式、路由模式和全模式
- 通往WinDbg的捷径
- android:在ViewPager中使用Button
- 【javascript】异步编年史,从“纯回调”到Promise
- substance在java swing中使用注意事项
- hibernate 基础
- HTML5本地存储之本地数据库篇
- mybatis高级映射-一对多
- OAuth2 Demo PHP