📄 stack4test.cpp
字号:
//: C13:Stack4Test.cpp
// From Thinking in C++, 2nd Edition
// Available at http://www.BruceEckel.com
// (c) Bruce Eckel 1999
// Copyright notice in Copyright.txt
//{L} Stack4
// Test new Stack
#include "Stack4.h"
#include "../require.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main() {
// Could also use command-line argument:
ifstream file("Stack4Test.cpp");
assure(file, " Stack4Test.cpp");
Stack textlines;
string line;
while(getline(file, line))
textlines.push(new string(line));
// Pop lines from the Stack and print them:
string* s;
while((s = (string*)textlines.pop()) != 0)
cout << *s << endl;
} ///:~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -