linkqueue.h

来自「此为数据结构课程学习中离散事件模拟的源程序。为银行业务的模拟系统。其中包括队列」· C头文件 代码 · 共 26 行

H
26
字号
#ifndef LinkQueue_h 
#define  LinkQueue_h 
#include<iostream.h>
#include<stdlib.h>

//-----------------------------------------------定义队列结点
struct qnode{       //队列结点
	int ArrivalTime;//到达时间
	int Duration;   //持续时间
	qnode *next;
};
//-----------------------------------------------定义队列类
class LinkQueue{      //队列类
	friend class Bank;//友元
private:
	qnode *front,*rear;
public:
	LinkQueue():front(NULL),rear(NULL){};
	~LinkQueue();
	int length();
	int IsEmpty()const {return front==NULL;};
	void EnQueue(int,int);         //归队
	qnode *DelQueue();         //出队,并将出队结点返回
	void QueuePrint();	           //输出队列
};
#endif     

⌨️ 快捷键说明

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