#include<bits/stdc++.h>
using namespace std;
//queue的详细使用
queue<int> q;
/**
queue为队列
**/
int main(){
/**
方法很少
**/
q.push(1);
q.push(2);
q.push(3);
q.push(4);
//size()
//back()
//front()
while(!q.empty()){
cout<<q.front()<<" ";
q.pop();
}
return 0;
}
算法c++之stl---queue详细使用
最新推荐文章于 2021-05-27 02:43:54 发布