struct tnode *creatTree(struct tnode *head){char e;scanf("%c",&e);fflush(stdin);if(e !='#'){
head =(struct tnode *)malloc(sizeof(struct tnode));//先开辟空间
head ->data = e;//判断不是'#'后,给根节点赋值
head ->lchild =NULL;
head ->rchild =NULL;//依次把左儿子和右儿子调用该方法进行赋值
head ->lchild =creatTree(head->lchild);
head ->rchild =creatTree(head->rchild);}return head;}