#include <iostream>
using namespace std;
const int MAXSIZE = 100;
class BTTree
{
public:
BTTree(){
lchild = rchild = NULL;
}
int data;
BTTree * lchild;
BTTree * rchild;
void CreatBT(BTTree * &t);
void PrePrintBT(BTTree *);
void InPrintBT(BTTree *);
void PostPrintBT(BTTree *);
void LevelPrintBT(BTTree *);
};
void BTTree::CreatBT(BTTree * &t)
{
int value;
cin >> value;
if(value==0){
t=NULL;
}else{
t = new BTTree;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余4页未读,立即下载