#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "time.h"
#define ok 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
typedef int Status;
typedef char TElemType;
TElemType Nil = ' ';
typedef struct BiTNode
{
TElemType data;
struct BiTNode *lchild,*rchild;
}BiTNode,*BiTree;
Status Visit (BiTree e)
{
if(e != NULL)
{
printf("%c",e->data);
}
return ok;
}
Status InitBiTree(BiTree *T)
{
*T=NULL;
return ok;
}
/*这里用到二级指针*/
void DestroyBiTree(BiTree *T)
{
if(NULL != (*T))
{
if((*T)->lchild)
{
DestroyBiTree(&(*T)->lchild);
}
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "time.h"
#define ok 1
#define ERROR 0
#define TRUE 1
#define FALSE 0
typedef int Status;
typedef char TElemType;
TElemType Nil = ' ';
typedef struct BiTNode
{
TElemType data;
struct BiTNode *lchild,*rchild;
}BiTNode,*BiTree;
Status Visit (BiTree e)
{
if(e != NULL)
{
printf("%c",e->data);
}
return ok;
}
Status InitBiTree(BiTree *T)
{
*T=NULL;
return ok;
}
/*这里用到二级指针*/
void DestroyBiTree(BiTree *T)
{
if(NULL != (*T))
{
if((*T)->lchild)
{
DestroyBiTree(&(*T)->lchild);
}