⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 linkqueue.h

📁 此为数据结构课程学习中离散事件模拟的源程序。为银行业务的模拟系统。其中包括队列
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -