#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#define INITSIZE 100 //线性表存储空间的初始分配量
#define LISTINCREMENT 10 //线性表存储空间的分配增量
#define OK 1
#define ERROR 0
#define OVERFLOW -1
typedef int ElemType;
typedef int Status;
typedef struct{
ElemType *elem;
int length;
int listsize;
}SqList;
#include<stdlib.h>
#include<malloc.h>
#define INITSIZE 100 //线性表存储空间的初始分配量
#define LISTINCREMENT 10 //线性表存储空间的分配增量
#define OK 1
#define ERROR 0
#define OVERFLOW -1
typedef int ElemType;
typedef int Status;
typedef struct{
ElemType *elem;
int length;
int listsize;
}SqList;
Status InitList(SqList &L)
{//构造一个空的顺序表L。
L.elem = (ElemType * )malloc(INITSIZE*sizeof(ElemType));
if(! L.elem)exit(OVERFLOW);
L.length = 0;
L.listsize = INITSIZE;
return(OK);
}
{//构造一个空的顺序表L。
L.elem = (ElemType * )malloc(INITSIZE*sizeof(ElemType));
if(! L.elem)exit(OVERFLOW);
L.length = 0;
L.listsize = INITSIZE;
return(OK);
}
void Assign(SqList &L)
{//为顺序表L的各元素赋值
int i,N;
printf("Please input the Number of the SqList:");
scanf("%d",&N);
printf("Please input
{//为顺序表L的各元素赋值
int i,N;
printf("Please input the Number of the SqList:");
scanf("%d",&N);
printf("Please input