Checking whether a list is empty is to check if the size of the
underlying array is less than or equal to the index of the first
value.
int List_isempty(struct List *pList)
{
return ((struct _List *)pList)->index >= ArrayADT_getsize(((struct _List *)pList)->array);
}
Copyright © 2006-09-27 by Tak Auyeung