Jump to content
  • Advertisement
Sign in to follow this  
AdamGL

Linked lists

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone explain linked lists to me. I've checked all the sites, I need a basic explanation and example. Thanks. :) Adam L

Share this post


Link to post
Share on other sites
Advertisement
No homework questions. =D

Since this sounds too much like homework, I'll keep it simple and let you figure out implementation.

You have an object, it has a "pointer" as an attribute which points to another object of the same type. This next object has a pointer attribute which points to the next object. By keeping track of the first object and placing each sucessive object in the pointer of the last object, you can find every object in this list just by following the trail of pointers.

Imagine a book, where every page was jumbled up, but each page told you where the next page is. From page 12, the next page is 27.

Share this post


Link to post
Share on other sites
Quote:
Original post by AdamGL
I've checked all the sites,


My god man! You must have super-human web-browsing powers! You don't need to know how to write a linked list with those powers on your side!

Share this post


Link to post
Share on other sites

This topic is 4844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!