#include<iostream>
#include<queue>
using namespace std;
int main()
{
queue<int> q;
cout << q.empty() << endl;//是输出1 否输出0
cout << endl;
q.push(1);
q.push(2);
cout << q.empty() << endl;
cout << endl;
cout << q.size() << endl;
cout << q.front() << endl;
cout << q.back() << endl;
cout << endl;
q.pop();
cout << q.front() << endl;
cout << q.back() << endl;
return 0;
}
OJ:STL之queue
最新推荐文章于 2021-11-14 19:39:30 发布