#include<stdio.h>
#include<stdlib.h>
#include<math.h>
typedef char elemtype;
typedef struct BiNode
{
elemtype data;
struct BiNode* lchild, * rchild;
}BiNode,*BiTree;
typedef struct tag
{
BiTree p;
struct tag* next;
}tag_t,*ptag_t;
int CreatTree(BiTree& tree)
{
elemtype c;
int i = 0;
printf("回车键结束输入\n");
printf("请输入树节点值:\n");
BiTree pnew;
tree = NULL;
ptag_t phead, ptail, listpnew, pcur;
phead = ptail = pcur = NULL;
while (scanf_s("%c", &c) != EOF)
{
if (c == '\n')
{
break;
}
pnew = (BiTree)calloc(1, sizeof(BiNode));
pnew->data = c;
l