Everytime I print the list it only prints the last node added into the linked list.
My print function is as follows:
It'll print out the last name and ID I added to the list.Code:while(head !=NULL) { printf("%s , %s , %d\n", head->fname, head->lname, head->ID); head = head->next; }
How do get it to print out the entire list?



LinkBack URL
About LinkBacks



