三叉链表二叉树

void CreateBiTree(BiPTree &T)
{
	TElemType ch;
	scanf(form,&ch);
	if(ch=='#')  T==NULL;
   	else
   	  {		
   		*T = (BiTree)malloc(sizeof(BiTNode));
   		(*T)->data = ch;
   		
   		CreateBiTree(&(*T)->Lchild);		
   		if(T->Lchild) 			
   		T->lchild->parent=T;		
   		
   		CreateBiTree(&(*T)->Rchild);	
   		if(T->Rchild)			
   		T->Rchild->parent=T; 	
   	}
}

你可能感兴趣的:(三叉链表二叉树)