One quick edit on that last post... I think that...

   /* Count the members in the linked list */
   for (nmemb = 0, help = help_first; help != NULL; help =
help->next,nmemb++);

   return if(!nmemb);
 
   /* Create an array to store them */
   help_array= alloc_mem(sizeof(help) * i);
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this line

should actually read:

   help_array= alloc_mem(sizeof(help) * nmemb);

so that it allocates the sizeof help times the number of elements it
counted in that first for loop...

Richard Lindsey


Reply via email to