Click to See Complete Forum and Search --> : Linked Lists...
I just read the chapter on linked lists in my C book... and I don't understand them at all, it didn't really explain anything, just gave some code..... can somebody explain to me how to use linked lists, and why to use them....
thanks,
Dennis Wrenn
HarryW
Dec 29th, 2000, 01:24 PM
They're a bit like arrays in that they are used to group objects/structures together. Each object/structure has a pointer to the next object/structure in the list, and possibly to the previous one if it's a doubly linked list.
They are useful for all kinds of reasons. You can rearrange the pointers instead of reordering the data. You can have the last object/structure pointing to the first one so it loops round. You can also easily insert data at any point in the list just by changing the pointers. It's a very good idea on the whole.
Did that make it any clearer?
A little bit, but how do I use them?
the book didn't explain anything....
Thanks,
Dennis
HarryW
Dec 30th, 2000, 12:08 PM
I posted a thread on implementing this kinda thing a while ago, take a look:
http://forums.vb-world.net/showthread.php?threadid=31312
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.