标题:怎么改呀??
只看楼主
想你的天空
Rank: 2
等 级:新手上路
威 望:5
帖 子:610
专家分:0
注 册:2004-12-30
 问题点数:0 回复次数:1 
怎么改呀??


#include "iostream"
#include "fstream"
#include "string"
#include "stdio.h"
using namespace std;

typedef struct BiNode{
int data;
struct BiNode *left, *right;
}BiNode, *BiTree;
void CreateBiTree(BiTree &t)
{
int number;
cin>>number;
if( number == -1 ) t = NULL;
else{
if(!(t = (BiNode *)malloc(sizeof(BiNode)))) exit(1);
t->data = number;
CreateBiTree(t->left);
CreateBiTree(t->right);
}
}
void preOrder(BiTree t)
{
if(t)
{
cout<<t->data;
if(t->left!=NULL || t->right!=NULL)
{
cout<<"(";
preOrder(t->left);
cout<<",";
preOrder(t->right);
cout<<")";
}
}
}
int main()
{
BiTree t;
CreateBiTree(t);
preOrder(t);
system("pause");
return 0;
}

搜索更多相关主题的帖子: BiNode number include int 
2005-11-05 11:29
冰镇柠檬汁儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:北京
等 级:版主
威 望:120
帖 子:8074
专家分:6657
注 册:2005-11-7
得分:0 
改什么呀?

本来无一物,何处惹尘埃
It is empty at all here, Why pm 2.5 is so TMD high!
2005-11-07 18:22



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-32690-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050556 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved