程序无输出结果
#include<stdio.h>
#include<stdlib.h>
typedef struct _BiThrNod{
int data;
struct _BitThrNod *lchild,*rchild;
}BiThrNod,*BiThrTree;
void CreatBirTree(BiThrTree Tree)
{
int el;
scanf("%d",&el);
if(el == 0) Tree = NULL;
else
{
Tree = (BiThrTree)malloc(sizeof(BiThrNod));
Tree -> data = el;
printf("%d \n",Tree->data);
CreatBirTree(Tree-> lchild);
CreatBirTree(Tree-> rchild);
}
}
void PreOrder(BiThrTree Tree)
{
if(Tree)
{
printf("%d ",Tree->data);
PreOrder(Tree->lchild);
PreOrder(Tree->rchild);
}
}
int main()
{
BiThrTree T;
CreatBirTree(T);
PreOrder(T);
return 0;
}