queue使用内联函数实现stl功能

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了queue使用内联函数实现stl功能相关的知识,希望对你有一定的参考价值。

struct queue
{
	int head,tail;
	int num[100000];
	queue()	{head=0;	tail=0;}
	inline void push(int o)	{num[tail++]=o;}
	inline int pop()	{return num[head++];}
	inline bool	empty()	{return head>=tail;}
};//必须加入;
int temp=q.pop();
q.push(e[i].y);
!q.empty();

  

以上是关于queue使用内联函数实现stl功能的主要内容,如果未能解决你的问题,请参考以下文章