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

📄 stl-stack.cc

📁 压缩包里有教材<<C++模式设计-基于QT4开源跨平台开发框架>>所有源码
💻 CC
字号:
// Filename: STL-stack.cc// Adapting a stack from a vector#include <iostream>#include <vector>#include <stack>#include <string>using namespace std;int main() {    stack<string, vector<string> > strStack;    string quote[3] = {                          "Any food that starts out hard will soften when stale.\n",                          "Any food that starts out soft will harden when stale.\n",                          "Isaac's Strange Rule of Staleness\n"                      };    for (int i =0; i < 3; ++i)        strStack.push(quote[i]);    while (!strStack.empty()) {        cout << strStack.top();        strStack.pop();    }}/*outOOP> gpp STL-stack.ccOOP> a.outIsaac's Strange Rule of StalenessAny food that starts out soft will harden when stale.Any food that starts out hard will soften when stale.OOP>*/

⌨️ 快捷键说明

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