Hi,
Your question is not clear. I am able to interpret that you want to save whatever is there in the link list in a file and then to create a link list from that file.
If my above interpretation is correct then following may help:
1. Consider each node of link list as a record in the file.
2...
Hi,
your code does not free the memory of the last node.
This happens bcoz you are checking the next of a node for the NULL value. When the control reaches on the last node, "while loop" condition will fail and it will not enter the loop.
Try the following code:
listelement = start...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.