queue.h

来自「本程序在visual c++环境下实现二叉树的层次遍历.」· C头文件 代码 · 共 33 行

H
33
字号
// queue.h: interface for the queue class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_QUEUE_H__02287866_9920_4BD8_A61B_E37D3E813B45__INCLUDED_)
#define AFX_QUEUE_H__02287866_9920_4BD8_A61B_E37D3E813B45__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "Tree.h"
//定义队列的结点结构,item表树的结点结构,next表示队列下一个指针。
struct node{
	struct binode * item;
	struct node * next;
};

class queue  
{
public:
	node * rear, * head;
	queue();
	virtual ~queue();
	//向队列中添加新的元素。
	void Add_Queue( binode * element);

	//从队列中删除元素
	binode * Del_Queue();


};

#endif // !defined(AFX_QUEUE_H__02287866_9920_4BD8_A61B_E37D3E813B45__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?