搞个平台要花多少钱,seo营销工具,公司邮箱是什么,项目管理流程#define _CRT_SECURE_NO_WARNINGS
#includeiostream
#includequeue
using namespace std;/*Queue所有元素的进出都必须符合”先进先出”的条件#xff0c;
只有queue的顶端元素#xff0c;
才有机会被外界取用。
Queue不提供遍历功能#xff0c;
也不提供迭…#define _CRT_SECURE_NO_WARNINGS
#includeiostream
#includequeue
using namespace std;/*Queue所有元素的进出都必须符合”先进先出”的条件
只有queue的顶端元素
才有机会被外界取用。
Queue不提供遍历功能
也不提供迭代器。*/void test()
{//没有迭代器queueint q;q.push(10);q.push(20);q.push(30);q.push(40);queueint q1;//while (!q.empty())//{// cout 队头q.front() endl;// cout 队尾 q.back() endl;// cout q.size() endl;// // q.pop();//}q1 q;while (!q1.empty()){cout 队头 q1.front() endl;cout 队尾 q1.back() endl;cout q1.size() endl;q1.pop();cout 容器所占字节 sizeof(q1) endl;}
}int main()
{test();system(pause);return EXIT_SUCCESS;
}queue 容器是一种先进先出的 队列容器只能访问到顶端元素不支持遍历不提供迭代器
queue 不支持sort()排序