queue基本操作函数
来源:互联网 发布:手机海拔高度软件 编辑:程序博客网 时间:2024/06/06 19:08
//// main.cpp// 160929//// Created by liuzhe on 16/9/29.// Copyright © 2016年 my_code. All rights reserved.////#include <bits/stdc++.h>#include <iostream>#include <algorithm>#include <cstdio>#include <cmath>#include <cstring>#include <string>#include <string>#include <map>#include <set>#include <queue>#include <deque>#include <list>using namespace std;//queue基本操作函数template<class T,class Container>//队列便遍历模板函数void PrintQueue(queue<T,Container>obj){ while(!obj.empty()){ cout<<obj.front()<<'\t'; obj.pop(); }}int main(){ string str = "a"; queue<string,deque<string> >t;//字符串队列 for(int i=0;i<4;i++){ t.push(str); str+="a"; } PrintQueue(t);//a aa aaa aaaa cout<<endl; queue<float,list<float> >u;//浮点队列 for(int i=0;i<4;i++) { u.push(i+1); } PrintQueue(u);//1 2 3 4 cout<<endl; return 0;}
0 0
- queue基本操作函数
- C++队列Queue基本操作
- 1443.Printer Queue 基本队列操作
- queue stack priority_queue的基本操作
- mysql 基本操作函数
- string基本操作函数
- MAP基本操作函数
- scala函数基本操作
- 基本字符串操作函数
- pandas基本操作函数
- stl stack 和 queue 的基本操作和理解
- 考研党 《数据结构(C语言版)》 严蔚敏Queue基本操作
- queue操作
- 栈stack和队列queue的常用基本函数
- queue 函数
- 栈的基本操作函数!
- map函数的基本操作
- String的基本操作函数
- java中String的常用方法
- DDX和DDV
- Android 高性能编码-IOC模式
- Python 编程基础 学习笔记
- Android Vsync详解
- queue基本操作函数
- HDU 4915
- Quartz 指南
- 排序算法之桶排序
- mysql 批量更新与批量更新多条记录的不同值实现方法
- IntelliJ Idea编译报错:请使用 -source 7 或更高版本以启用 diamond 运算符
- java注解的学习
- vb.net cad 重新生成填充边界
- linux 缺少动态连接库.so--cannot open shared object file: No such file or directory