#include<stdio.h>
#include<stdlib.h>
#define SIZE 23
typedef struct BiTNode
{char data;
struct BiTNode *Lchild,*Rchild;
}BiTNode,*BiTree;
BiTree creatBiTree(BiTree T)
{char ch;
BiTree T0;
printf("input the datas:\n");
scanf("%c",&ch);
if(ch=='#') T0=NULL;
else{
if(!(T=(BiTNode *)malloc(sizeof(BiTNode)))) exit(0);
T->data=ch;
creatBiTree(T->Lchild);
creatBiTree(T->Rchild);
T0=T;
}
return(T0);
}
大侠们,看下哪里出了问题?
[此贴子已经被作者于2007-5-13 17:06:42编辑过]