作者在 2016-05-03 08:57:43 发布以下内容
#define MaxSize 100
typedef struct BTree
{
int data;
struct BTree *Lchild;
struct BTree *Rchild;
}BT;
void inorder(BT *bt)
{
int i = 0;
BT *s[MaxSize], *p;
p = bt;
do {
while (p != NULL)
{
s[i++] = p;
p = p->Lchild;
}
if (i>0)
{
p = s[i--];
printf("%d", p->data);
p->Rchild;
}
} while (i>0 || p != NULL)
}