想要一棵樹

一個半成品,鏈表實現樹

【程序】

#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;
}


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章