10_14.cpp
来自「C++案例教程源代码」· C++ 代码 · 共 11 行
CPP
11 行
#include <iostream>
#include <queue>
using namespace std;
int main()
{ queue< double > q; //创建空的队列容器
q.push( 3.2 ); q.push( 9.8 ); q.push( 5.4 ); //向空的队列容器添加元素
cout << "Popping from q: ";
while ( !q.empty() ) {cout << q.front() << ' '; q.pop();} //输出元素后移除元素
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?