v0.1
This commit is contained in:
37
yaokon/Core/Src/queue.h
Normal file
37
yaokon/Core/Src/queue.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
*@文件: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
|
||||
Reference in New Issue
Block a user