#include <stdio.h>
#include <stdlib.h>
//结构体的封装
typedef struct TreeNode{
char data;
struct TreeNode *leftchild,*rightchild;
}TreeNode;
//先序建立二叉树
void CreateTree(TreeNode *&T){
char x;
scanf("%c",&x);
if(x=='#') T
#include <stdio.h>
#include <stdlib.h>
//结构体的封装
typedef struct TreeNode{
char data;
struct TreeNode *leftchild,*rightchild;
}TreeNode;
//先序建立二叉树
void CreateTree(TreeNode *&T){
char x;
scanf("%c",&x);
if(x=='#') T