标签:amp tree turn int struct 结束 har scan style
typedef struct Node
{
TElemType data;
struct Node * lchild, * rchild;
} BiTNode,*BiTree;
void create(BiTree *root)
{
char sr;
scanf("%c",&sr);
if(c==‘#‘) root = NULL;
else
{
*root=(BiTNode*)malloc(sizeof(BiTNode));
(*root)->data=sr;
create(&((*root)->lchild);
create(&((*root)->rchild);
}
}
void PrintLeaf(BiTree root)
{
if (root==NULL) return;
else
{
if (root->lchild==NULL&&root->rchild==NULL)
printf("%c",root->data);
PrintLeaf(root->lchild);
PrintLeaf(root->rchild);
}
}
明天会更好!.
标签:amp tree turn int struct 结束 har scan style
原文地址:https://www.cnblogs.com/iGGBond/p/12810976.html