?? stl-stack.cc.svn-base
字號:
// 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 + -