C++实现线性表之顺序表
List.h
#ifndef LIST_H
#define LIST_H
#include <iostream>
using namespace std;
class List
{
public:
List(int size); //创建线性表
~List(); //销毁线性表
void ClearList(); //清空线性表
bool ListEmpty(); //判断线性表是否为空
int ListLength(); //获取线性表的长度
bool GetElem(int i, int &e); //获取指定元素
int LocateElem(int &e); //寻找第一个满足e的数据元素的位序
bool PriorElem(int ¤tElem, int &preElem); //获取指定元素的前驱
bool NextElem(int ¤tElem, int &nextElem); //获取指定元素的后继
bool ListInsert(int n, int &e); //在第n个位置上插入元素
bool ListDelete(int n