#include "stdio.h"
#include "stdlib.h"
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int status;
typedef int ElemType; //数据元素类型定义
#define LIST_INIT_SIZE 100
#define LISTINCREMENT 10
typedef int ElemType;
typedef struct{ //顺序表(顺序结构)的定义
ElemType * elem;
int length;
int listsize;
}SqList;
typedef struct{ //线性表的管理表定义
struct { char name[30];
SqList L;
} elem[10];
int length;
int listsize;
}LISTS;
status AddList(LISTS &Lists, char ListName[])
{
}
本关任务:编写一个函数实现增加一个新的线性表。
函数原型:status AddList(LISTS &Lists,char ListName[])
功能说明:Lists是一个以顺序表形式管理的线性表的集合,在集合中增加一个新的空线性表。增加成功返回OK,否则返回ERROR。