38 lines
641 B
C
38 lines
641 B
C
/*
|
|
*@文件:queue.h
|
|
*@作者:‘你遇了我’
|
|
*@time:2022/11/13
|
|
*@联系:QQ:321640253
|
|
*@描述:
|
|
*/
|
|
//
|
|
// Created by 86186 on 2022/11/13.
|
|
//
|
|
|
|
#ifndef LIST_QUEUE_H
|
|
#define LIST_QUEUE_H
|
|
|
|
#include "stdint.h"
|
|
#include "stdbool.h"
|
|
#include "stdlib.h"
|
|
#include "stdio.h"
|
|
|
|
#define Maxsize 20
|
|
|
|
typedef uint32_t quecuElemtype;
|
|
|
|
typedef struct{
|
|
quecuElemtype data[Maxsize];
|
|
int front,rear;
|
|
uint16_t size;
|
|
} SqQuecu;
|
|
|
|
void InitQuecu(SqQuecu *Q);
|
|
quecuElemtype deQueue(SqQuecu *Q);
|
|
bool enQueue(SqQuecu *Q,quecuElemtype e);
|
|
bool QueueEmpty(SqQuecu *Q);
|
|
// void DestroyQueue(SqQuecu *Q);
|
|
void DispQuecu(SqQuecu *Q);
|
|
|
|
#endif //LIST_QUEUE_H
|