From 7301cebfc2f14218e9b37b098f49389483acc403 Mon Sep 17 00:00:00 2001 From: Xu Bai <1373953675@qq.com> Date: Wed, 24 Jul 2019 11:34:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _04.树/_c.线索二叉树.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/_04.树/_c.线索二叉树.c b/_04.树/_c.线索二叉树.c index 93f0b6d..b388a85 100644 --- a/_04.树/_c.线索二叉树.c +++ b/_04.树/_c.线索二叉树.c @@ -2,7 +2,7 @@ * @Author: Xu Bai * @Date: 2019-07-23 22:43:14 * @LastEditors: Xu Bai - * @LastEditTime: 2019-07-23 22:52:27 + * @LastEditTime: 2019-07-24 02:24:35 */ #include "string.h" #include "stdio.h" @@ -38,4 +38,25 @@ Status visit(ElemType e) { printf("%c ", e); return OK; +} + +Status CreateBiThrTree(BiThrNode *T) +{ + ElemType h; + scanf("%c", &h); + if (h == Nil) + { + *T = NULL; + } + else + { + *T=(BiThrTree)malloc(sizeof(BiThrNode)); + if (!*T) + { + exit(-1); + } + + + } + } \ No newline at end of file