?? sqpqueue.h
字號:
//SqPQueue.h
//不考慮優先級相同元素的先進先出
//問題的順序優先級隊列類定義
#include<fstream.h>
#define MaxSize 6
typedef struct Datatype
{int taskNo;
int priority;
}datatype;
class SqPqueue
{private:
datatype data[MaxSize];
int count;
public:
//構造函數
SqPqueue(){count=0;}
//析構函數
~SqPqueue(){}
//清空隊列
void ClearPq(){count=0;}
// 判斷隊空
int PQueueEmpty();
// 判斷隊滿
int PQueuefull();
//重載關系運算符小于<
friend int operator <(datatype &,datatype &);
// 隊列的插入
void InsertPQ(datatype);
// 隊列的刪除
datatype DeQueue();
// 取隊列的頭元素
datatype PQueuefront();
//求隊列的元素個數
int PQueueSize();
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -