chapter5-15.cpp
来自「大量程序实例」· C++ 代码 · 共 21 行
CPP
21 行
//文件名:CHAPTER5-15.cpp
#include <iostream>
#include "SLIST"
#include <functional>
using namespace std;
int main()
{
SLIST<int> L;
L.push_front(0);
L.push_front(1);
//L.insert_after(L.begin(), 2);
copy(L.begin(), L.end(),ostream_iterator<int>(cout, " ")); // The output is 1 2 0
cout << endl;
SLIST<int>::iterator back = L.end();
L.push_front( 3);
L.push_front(4);
L.push_front(5);
copy(L.begin(), L.end(),ostream_iterator<int>(cout, " ")); // The output is 1 2 0 3 4 5
cout << endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?