📄 stl-stack.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 + -