Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

asdasd12345

Pointer programs

This topic is 5386 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

Are there any programs that beginners can write that help them understand how to work with pointers better? I have done one with a singly linked list, but I was wondering if there are other that could be helpful.

Share this post


Link to post
Share on other sites
Advertisement
I think making linked list is one of the best pointer related things you can make. If you start trying to use pointers specifically in a project, you will only end up with bad coding habits. Learn how to use them yes... but only use them if absolutely necessary. A linked list probably shows enough understanding of pointers really. You are better spending time learning to use references correctly, and the built in container types (and subsequently the iterators, and STL algorithms).

Share this post


Link to post
Share on other sites
Writing a templated binary tree class might also be a fun exercise. It will certainly be a good exercise in pointers and recursive processing.

Share this post


Link to post
Share on other sites
I promise I have no affiliation with the publishers of this book, in case you were wondering, as I seem to be recommending it to everyone, but: this is an excellent book, and he implements a tree class to evaluate functions (for a symbolic calculator). I would say reading this book is a VERY good idea, and given you have a basic grounding in C++, its not going to be too hard going either.

Share this post


Link to post
Share on other sites

  • 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!