queue.cpp

来自「JICHERNG继承的实现」· C++ 代码 · 共 48 行

CPP
48
字号
// Queue.cpp: implementation of the Queue class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Queue.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Queue::Queue()
{

}

Queue::~Queue()
{

}

void Queue::EnterQueque(int newData)
{
	putTail(newData);
}

int Queue::PopQueue()
{
	return this->getHead();
}

int Queue::GetLength()
{
	return this->getElemCount();
}

void Queue::printQueue()
{
	cout<<"Queue head-->";
	list<int>::iterator j;
	for(j=dataLinkHead;j!=dataLinkTail;j++)
	{
		cout<<*j<<" : ";
	}
	cout<<endl;
	
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?