⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c06p303.txt

📁 Data Abstraction & Problem Solving with C++源码
💻 TXT
字号:
template <class T, class Container = deque <T> >class stack{public:   explicit stack(const Container& cnt = Container());   // Default constructor; initializes an empty stack.   // Precondition: None.   // Postcondition: An empty stack exists.   bool empty() const;   // Determines whether the stack is empty.   // Precondition: None.   // Postcondition: Returns true if the stack is empty,   // otherwise returns false.   size_type size() const;   // Determines the size of the stack. The return type   // size_type is an integral type.   // Precondition: None.   // Postcondition: Returns the number of items that   // are currently on the stack.   T &top();   // Returns a reference to the top of the stack.   // Precondition: None.   // Postcondition: The item remains on the stack.   void pop();   // Removes the top item in the stack.   // Precondition: None.   // Postcondition: The item most recently added is removed   // from the stack.   void push(const T& x);   // Adds an item to the top of the stack.   // Precondition: None.   // Postcondition: Item x is on top of the stack.} // end STL stack

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -