?? 建立樹.h
字號:
#include<stdlib.h>
#include<stdio.h>
typedef struct BiTNode
{
char data;
BiTNode *lchild ,*rchild;//左右孩子
}BiTNode, *BiTree;
//BiTree Null;
void visit(BiTree &T)
{
printf("%c",T->data);
}
void CreateBiTree(BiTree &T)
{
char ch;
scanf("%c",&ch);
if(ch=='.')T=NULL;
else {
if(!T)exit(0);
T= (BiTNode*)malloc(sizeof(BiTNode));
T->data=ch; // 生成根結點
CreateBiTree(T->lchild); // 構造左子樹
CreateBiTree(T->rchild); // 構造右子樹
}
//return T;
} ;// CreateBiTree
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -