#include"tree.h"
const int max = 100;
typedef char TElemType;
typedef struct CTNode
{
int child;
struct CTNode *next;
}*ChildPtr,CTNode;
typedef struct
{
int parent;
TElemType data;
ChildPtr firstchild;
}CTBox;
typedef struct
{
CTBox node[max];
int n, r;
}CTree;
void CreateTree(CTree &tree)
{
ChildPtr childhead = NULL, childltemp = NULL, childs=NULL;
int count,num;
cout << "请输入树的结点个数" << endl;
cin >> tree.n;
for (int i = 0; i < tree.n; i++)
{
cout << "请输入第:" << i<<"个结点的值" << endl;
cin >> tree.node[i].data;
cout << "请输入它的双亲的序号" << endl;
cin >>