摘要:
#include using namespace std;typedef int ElemType;#define Maxsize 100//顺序表的两个要素:data和lengthtypedef struct {ElemType data[Maxsize];int length;}SqList;//1.创建线性表void CreateList(SqList *&L,ElemType a[], int n)//注意引用的使用{if(n>Maxsize)throw"上溢";else{for(int i=0;i>a[i];L->data[i]=a[i] 阅读全文