測試代碼
TestList.c
[cpp]
#include <stdio.h>
#include "List.h"
int main()
{
int a = 0;
ElemType Elem;
SeqList list;
initList(&list);
for(; a<25; a++)
{
listAppend(&list, a);
}
showListInfo(&list);
if(getElem(&list, 20, &Elem))
printf("%d",Elem);
listInsert(&list, 23, 2323);
listInsert(&list, 23, 2323);
listInsert(&list, 23, 2323);
// listInsert(&list, 23, 2323);
// listInsert(&list, 23, 2323);
//
showList(&list);
reverseList(&list);
showList(&list);
}