//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.

  

stack(STL)的更多相关文章

  1. C++学习注意点

    1.cin,cout关同步再用,不然效率很糟cin,cout关同步再用,不然效率很糟cin,cout关同步再用,不然效率很糟.重要的事情说三遍.关同步代码:std::ios::sync_with_st ...

  2. C语音常用库和函数

    #include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> //定义错误码 # ...

  3. C/C++头文件一览

    C.传统 C++ #include <assert.h> //设定插入点 #include <ctype.h> //字符处理 #include <errno.h> ...

  4. 剑指offer--面试题7

    //两个栈实现一个队列 #include<stack> //STL #include<iostream> using namespace std; template<cl ...

  5. linux常用头文件

    http://blog.csdn.net/kokodudu/article/details/17361161 aio.h 异步I/Oassert.h 验证程序断言 complex 复数类complex ...

  6. C++常用库函数

    C++常用库函数  转自:http://blog.csdn.net/sai19841003/article/details/7957115 1.常用数学函数 头文件 #include <math ...

  7. c语言_头文件

    传统 C++ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include <assert.h> //设定插入点 #include <ctyp ...

  8. ACM在线模板

    转载自:https://blog.csdn.net/f_zyj/article/details/51594851 Index 分类细则 说起分类准则,我也是很头疼,毕竟对于很多算法,他并不是单调的,而 ...

  9. include方便查找

    #include <assert.h> //设定插入点#include <ctype.h> //字符处理#include <errno.h> //定义错误码#inc ...

随机推荐

  1. Linux Ubuntu 虛擬機系統自定義桌面分辨率且重啓後保持不變

    我用 VMware Workstation 12 Pro 安裝的 Ubuntu MATE Desktop Environment 1.12.1,發現安裝後沒有需要的分辨率,於是安裝 VMware To ...

  2. 自己通过centos6.5配置NFS 成功后的笔记,希望对需要的人有点点帮助吧!

         环境介绍:            服务器:centos  172.16.250.170            客户端:centos  172.16.250.172     先用rpm -qa ...

  3. 将mysql的data目录移走方法

    如移动到"/home/mysql/data",我的mysql是装在/usr/local/mysql下的 1. 将/usr/local/mysql/data移动到/home/mysq ...

  4. Xcode打包framework脚本

    参考文章: http://www.jianshu.com/p/1cb4c4fe5481 https://gist.github.com/cromandini/1a9c4aeab27ca84f5d79 ...

  5. Java 基础知识(一)

    Java基础知识篇: 一.关键字解释 1. final:修饰非抽象类,非抽象方法和属性, 以及修饰方法参数,代表“无法改变的”.出于对设计或者效率的考虑使用该关键字. final类无法被继承,fina ...

  6. SQL总结之对比和备份

    -----用户解锁select * from wfuser for update ----------------------修改金额select * from bp_account where ac ...

  7. Chapter 21_5.1 URL编码

    URL编码是http所使用的一种编码方式,用于在一个URL中传送各种参数.该编码方式会将特殊字符("=","&","+")编码为&q ...

  8. 关于FileSystemXmlApplicationContext和ClassPathXmlApplicationContext路径问题

    在码代码的时候发现使用这两个方法写路径的时候总是存在问题,所以百度了一下解决了这个问题. 关于FileSystemXmlApplicationContext这个路径有2总写法 有盘符的代表的是绝对路径 ...

  9. C#删除只读文件或文件夹(解决File.Delete无法删除文件)

    引用: http://www.jb51.net/article/72181.htm   C#删除只读文件的方法: if (File.GetAttributes(FFName).ToString().I ...

  10. 2016NOMS全国运营峰会——史上更强嘉宾阵容提前揭晓!

    参加2016NOMS全国运营峰会的演讲嘉宾来自运营领域的各个方面,包括用户运营.内容运营.活动运营.数据运营等.自大会消息一出立刻受到业界的广泛关注,并吸引了众多业内人士踊跃报名.日前,这一运营界峰会 ...