int CreateBiTree(BiTree &T) {
char ch;
scanf_s("%c", &ch);
if (ch == '#')T = NULL;
else {
if (!(T = (BiTNode *)malloc(sizeof(BiTNode)))) {
exit (0);
}
T->data = ch;
CreateBiTree(T->lchild);
CreateBiTree(T->rchild);
}
return 1;
}
case 1: {
printf("輸入二叉樹\n");
if (CreateBiTree(T)) { printf("創建二叉樹成功"); }
break;
}
顯示輸入二叉樹,輸入之後,然後enter就沒反應了
http://blog.csdn.net/u014285517/article/details/50440829