源代码
- #include
- using namespace std;
- const int MaxSize=100;
- template
- class Score
- {
- public:
- Score(){ length=0; } //建立空的顺序表
- Score(DataType a[],int n); //建立长度为n的顺序表
- ~Score(){} //建立析构函数
- int Length(){ return length;} //求线性表的长度
- DataType Get( int i); //按位置查找
- int Locate(DataType x); //按值查找
- void Insert(int i,DataType x); //在位置i插入x
- DataType Delete(int i); //删除