/* 语言:C++ 编译环境:Visual C++6.0
循环队列——队列的顺序表示和实现
*/
#include <iostream>
#define OK 1
#define ERROR 0
#define OVERFLOW -2
// Status是函数返回值类型,其值是函数结果状态代码
typedef int Status;
// 自定义数据类型别名
typedef int QElemType;
using namespace std;
#define MAXQSIZE 100 // 队列可能达到的最大长度
// 队列的顺序存储结构
typedef struct
{
QElemType *base; // 存储空间的基地址
int front; // 头指针
int rear; // 尾指针
}SqQueue;
数据结构(5):循环队列——队列的顺序表示和实现
最新推荐文章于 2023-06-10 14:15:42 发布