一个半成品,链表实现树
【程序】
#include<stdio.h>
#include<stdlib.h>
typedef struct my_tree
{
int a;
struct my_tree left;
struct my_tree right;
}Tree;
void *Creat(Tree *t)
{
Tree *r,*s;
int a;
t=(Tree*)malloc(sizeof(Tree));
r=t;
scanf("%d",&a);
}
void *Creat(Tree *t)
{
t->left=NULL;
t->right=NULL;
}
int main()
{
Tree *t;
Creat(t);
return 0;
}