代码如下:
#include <iostream>
using namespace std;
typedef char ElemType;
const int MAXSIZE = 100;class link
{friend class Node;
private:int child;link *next;
};class Node
{friend class Tree;
private:ElemType data;link *first;
};class Tree
{
private:int n;Node elem[MAXSIZE];
};