priority_queue.h
来自「This is a binary search tree with void* 」· C头文件 代码 · 共 31 行
H
31 行
#ifndef PRIORITY_QUEUE#define PRIORITY_QUEUEtypedef struct { int actionType; int timeStamp; int id; int type;}heapInfo;typedef struct { heapInfo *heap; unsigned int maxSize; unsigned int size;}priorQueue;/*makes a new priority queue with fixed size(?)*/priorQueue* newHeap(unsigned int qsize);/*inserts a new sceduled action in the priority queue pointed by heapInfo* */int Insert(heapInfo *newAction,priorQueue *p);/*Gets the action with the highest priority*/heapInfo* getMin(priorQueue *p);/*Deletes and gets the action with the highest priority*/heapInfo* DeleteMin(priorQueue *p);void printall(priorQueue *p);#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?