经VB调试可用,输入时以井号键代替空格
#include
#include
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define OVERFLOW -2
typedef int Status;
typedef char TElemType;
typedef struct BiTNode{
#define MAXQSIZE 100
typedef BiTree QElemType;
typedef struct{
Status CreateBiTree(BiTree *T)
{
}
char ch; scanf("%c",&ch); if(ch=='#')*T=NULL; else{ } return OK; if(!(*T=(BiTNode*)malloc(sizeof(BiTNode)))) exit(OVERFLOW); (*T)->data=ch; CreateBiTree(&((*T)->lchild)); CreateBiTree(&((*T)->rchild)); QElemType base[MAXQSIZE]; int front; int rear; TElemType data; struct BiTNode *lchild,*rchild; }BiTNode,*BiTree; }SqQueue;