头文件
#include<stdio.h>
#include<stdlib.h>
#define Status bool
#define OVERFLOW 0
#define OK 1
#define SUCCESS 1
#define UNSUCCESS 0
typedef char AtomType;
结构体
typedef enum {
ATOM,LIST} ElemTag;//ATOM=0:原子;LIST=1:子表
typedef struct GLNode {
ElemTag tag;
union {
AtomType atom;
struct {
struct GLNode *hp, *tp;} ptr;
}un;
}GLNode,*GList; //广义表类型
按表头表尾求广义表深度
int