⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 queue.h

📁 本程序在visual c++环境下实现二叉树的层次遍历.
💻 H
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -