您的位置:首页 > 其它

3.2.2队列的顺序实现

2007-06-25 15:32 204 查看
// DataStructTest.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>
#include <malloc.h>

int const maxsize=20;
typedef struct cycqueue
//初始化队列,队列结构为保留一个结点作为标志,即front所在的点为标志点,不存储内容
void InitCycQueue(CycqueueTP & sq)
//入队,需要使用模除,用以实现循环
int EnCycQueue(CycqueueTP & sq,int value)
//出队
int OutCycQueue(CycqueueTP & sq,int & value)
//判断是否为空队列
int EmptyCycQueue(CycqueueTP & sq)
//取队头结点
int GetHead(CycqueueTP & sq,int & value)
//显示
void Display(CycqueueTP & sq)
int main(int argc, char* argv[])
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: