4.1.5 Set first value

This is easy to do. The value to update is simply passed on to the matching array ADT function (ArrayADT_setvalue).

char List_getfirstvalue(struct List *pList)
{
  char result = 0;
  if (index < ArrayADT_getsize(((struct _List *)pList)->array))
  {
    result = ArrayADT_getvalue(((struct _List *)pList)->array, index);
  }
  return result;
}



Copyright © 2006-09-27 by Tak Auyeung