二叉树基本操作代码
#include "stdafx.h" #include "stdlib.h" #include "string.h" #define MAX 100 typedef char Elemtype; typedef struct BTNODE { Elemtype data; BTNODE *left; BTNODE *right; } BTNode; void CreateBTNode(BTNode *&root, char *str) { BTNode *p = NULL; BTNode *st[MAX] = {NULL}; int top = -1; int i = 0; int k = 0; char ch = str[i]; while ('