zoukankan      html  css  js  c++  java
  • stack(STL)

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

      

  • 相关阅读:
    iOS -一些常用的方法
    handoff了解
    UIlabel
    扩展运行机制
    github -- fork提交项目
    iOS
    AppDelegate解析
    KVC
    KVO
    xcode升级后, 插件失效修复
  • 原文地址:https://www.cnblogs.com/KennyRom/p/5954389.html
Copyright © 2011-2022 走看看