Mail Archives: djgpp/1999/10/26/17:32:16
Hello Kieran,
in AddStudent() when you try to 'link' New to Start, Start doesn't really
exist.
What I mean is that sense Start is just a pointer to a STUDENT struct
It has to be allocated some memory. i.e.:
int main(void)
{
STUDENT *Start = calloc(1,sizeof(STUDENT));
if(!Start) { fprintf(stderr,"couldn't allocate Student list!\n");
return 0; }
AddStudent(Start);
CleanUp(Start);
return 0;
}
mind you I haven't tested this so it may not work, and I probably missed
something. :)
Hope this helps.
--
"An Optimist will say the glass is half full,
A Pessimist will say the glass is half empty,
A Canadian will say Waiter!"
Tom Fjellstrom
tomcf AT connect DOT ab DOT ca
- Raw text -