|
-
Dec 29th, 2000, 02:12 PM
#1
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
-
Dec 29th, 2000, 02:24 PM
#2
Frenzied Member
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?
Harry.
"From one thing, know ten thousand things."
-
Dec 29th, 2000, 02:30 PM
#3
A little bit, but how do I use them?
the book didn't explain anything....
Thanks,
Dennis
-
Dec 30th, 2000, 01:08 PM
#4
Frenzied Member
I posted a thread on implementing this kinda thing a while ago, take a look:
http://forums.vb-world.net/showthrea...threadid=31312
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|