main.cpp
来自「C++ Source code from a tutorial」· C++ 代码 · 共 33 行
CPP
33 行
#include <iostream>
#include <stdlib.h>
#include <deque>
#include <string>
using namespace std;
int main(int argc, char *argv[])
{
deque<int> mydek;
mydek.push_front(10);
mydek.push_front(20);
mydek.push_front(30);
mydek.push_back(40);
mydek.push_back(50);
mydek.push_back(60);
int loop;
for (loop = 0; loop < mydek.size(); loop++) {
cout << mydek[loop] << endl;
}
cout << endl;
while (mydek.size() > 0) {
cout << mydek.front() << endl;
mydek.pop_front();
}
system("PAUSE");
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?