#include<stdio.h>
#include<stdlib.h>
typedef struct BT{
int data;
struct BT *LChild;
struct BT *RChild;
}BT;
void CreateBT(BT *T){
int v;
scanf("%d",&v);
if(v==-1){
T=NULL;
}else{
T=(BT*)malloc(sizeof(BT));
T->data=v;
CreateBT(T->LChild);
CreateBT(T->RChild);
}
}
void Proput(BT *T){
if(T==NULL) return;
printf("%d ",T->data);
Proput(T->LChild);
Proput(T->RChild);
}
int main(){
BT *T,*head;
CreateBT(T);
Proput(head);
return 0;
}
T没有初始化啊