typedef struct node
{
char data;
struct node *lchild;
struct node *rchild;
}*btree;
btree create()
{
char element;//插入的值
printf("请输入i:");
scanf(" %c",&element);
if(element=='#')
{
return NULL;
}
btree t=(btree)malloc(sizeof(struct node));
t->data=element;
puts("左");
t->lchild=create();
puts("右");
t->rchild=create();
return t;
}
二叉树的创建 2023.10.3
最新推荐文章于 2024-08-31 22:19:14 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)