69,337
社区成员
发帖
与我相关
我的任务
分享
typedef struct node
{
int key;
struct node *lchild;
struct node *rchild;
}BiTreeNode, *BiTree;
extern BiTreeNode *NIL;
#include "a.h"
BiTreeNode *NIL = (BiTreeNode *)malloc( sizeof( BiTreeNode ) );
assert( NIL != NULL );
NIL->key = 0;
NIL->lchild = NULL;
NIL->rchild = NULL;
void BiTreeInsert()
{
//函数里使用到了结构体变量NIL
...
}
//错误信息提示是这里有问题
BiTreeNode *NIL = (BiTreeNode *)malloc( sizeof( BiTreeNode ) );
assert( NIL != NULL );
NIL->key = 0;
NIL->lchild = NULL;
NIL->rchild = NULL;