原创,做人好厚道,转载请表明出去
#include<iostream>
#include "List.h"
using namespace std;
int main()
{
List<int> list;
for(int i=0;i<10;i++) list.ListInsert(i+1,i*(1+i));
int a[10],b[10];
for(int i=0;i<list.ListLength();i++) cout<<list.GetElem(1+i,a[i])<<endl;
cout<<list.ListLength()<<endl;
cout<<list.LocateElem(90)<<endl;
list.NextElem(0,b[0]);
cout<<b[0]<<endl;
cout<<list.ListDelete(4,b[1])<<endl;
for(int i=0;i<list.ListLength();i++) cout<<list.GetElem(1+i,a[i])<<endl;
return 0;
}