- 0
- 0
- 约4.89千字
- 约 6页
- 2019-09-27 发布于江苏
- 举报
二叉树的实现.txt32因为爱心,流浪的人们才能重返家园;因为爱心,疲惫的灵魂才能活力如初。渴望爱心,如同星光渴望彼此辉映;渴望爱心,如同世纪之歌渴望永远被唱下去。#includeiostream
#includequeue
using namespace std;
#define NULL 0
////////////////////////////////////////
//二叉树的结点类
class BinaryTreeNode{
friend class BinaryTree;
private:
char element;
BinaryTreeNode *left;
BinaryTreeNode *right;
public:
BinaryTreeNode();
BinaryTreeNode(const char ele,BinaryTreeNode * l=NULL,BinaryTreeNode *r=NULL)
{
element=ele;
left=l;
right=r;
}
BinaryTreeNode *leftchild()const
{return left;}
BinaryTreeNode *rightchild()const
{return right;}
char value() const;
};
////
原创力文档

文档评论(0)