程序没报错,但是只能运行到printf("请输入要排序的序列:"); CreatBst(&b);下面就不能运行了,就是创建不了二叉排序树,求解求解

#include<stdio.h>
#include<malloc.h>
#include<math.h>
#define ENDKEY 0
typedef int KeyType;
typedef struct Node
{ KeyType key;
struct Node *lchild,*rchild;
}BstNode,*Bstree;
void InsertBst(Bstree *bst,KeyType key)
{ Bstree s;
if(*bst==NULL)
{
s=(Bstree)malloc(sizeof(BstNode));
s->key=key;
s->lchild=NULL;
s->rchild=NULL;
bst=s;
}
else if(key<(*bst)->key)
InsertBst((*bst)->lchild, key);
else if(key>(*bst)->key)
InsertBst((*bst)->rchild, key);
}
void CreatBst(Bstree *bst)
{
int key;
*bst=NULL;
scanf("%d,",&key);
while(key!=ENDKEY)
{ InsertBst(bst,key);
scanf("%d,",&key);
}}
void InOrder(Bstree bst)
{ if(bst!=NULL)
{ InOrder (bst->lchild);
printf("%d",bst->key);
InOrde (bst->rchild);
}}

Bstree SearchBst(Bstree bst,KeyType key)
{ Bstree q; q=bst;
while(q)
{
if(q->key==key) return q;
if(q->key>key) return q=q->lchild;
else q=q->rchild;
}
return NULL;
}
int main()
{
Bstree *b; int a,c;
printf("请输入要排序的序列:");
CreatBst(&b);
printf("中序遍历输出二叉排序表:");
InOrder(&b);
printf("输入要查找得数值:");
scanf("%d",&a);
SearchBst(b,&a);
if(b) printf("查找成功!");
printf("输入要插入得数值:");
scanf("%d",&c);
InsertBst(b,c);
printf("中序遍历输出插入后二叉排序表:");
InOrder(&b);
return 0;
}

你这个create函数的参数明显就是错的,还不报错,那你得换编译器了。还有就是,编译器一般只检查语法错误,那不代表你程序就能成功啊,你编一个1+1=2的程序也不会报错啊,但是它就是你想要的程序?所以不要觉得不报错就是对了。

creatbst调用,使用了取地址,但是函数定义里是个指针,你再想想