可以用for循环啊~~~while循环也可以啊
typedef struct BiTNode
{
int data;
BiTNode *leftChild;
BiTNode *rightChild;
}BiTNode,*BiTree;
BiTNode *p,*q,*a;
void Insert(BiTree &b,int key)
{
if (b==NULL)
{
BiTNode*s = new BiTNode;
s->data=key;
b=s;
b->leftChild=NULL;
b->rightChild=NULL;
}
else
{
if(keydata)
{
//b=b;
Insert(b->leftChild,key);
}
else
{
Insert(b->rightChild,key);
}
}
}
void Creat(BiTree &b)
{
int x=0;
do
{
cout |