Jump to content
  • Advertisement
Sign in to follow this  
warp X

STL question

This topic is 4793 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 articles or resources on the Web about using STL in game programming? I mean, when, or in which kind of situations one would use which containers and algorithms? Are there any books about this specific topic?

Share this post


Link to post
Share on other sites
Advertisement
Lets get one thing straight first, techincally there is no STL only the standard library.

Quote:
Original post by warp X
Are there any articles or resources on the Web about using STL in game programming?


Not that i've come across.

Quote:
Original post by warp X
I mean, when, or in which kind of situations one would use which containers and algorithms?


In general its just common sense, you need a container with some specific qualities you go see if the ones available match your criteria. Generic algorithms should be always preferred over explicit loop code on containers (including C-style arrays/strings and you can use them with it too).

some tips.

In C++ in general if you need a dynamic array use C++ style dynamic array std::vector/deque don't use C-style dynamic arrays.

In C++ in general if you need to use mutable strings prefer C++ style strings std::basic_string don't use C-style mutable strings.

Quote:
Original post by warp X
Are there any books about this specific topic?


I don't think there is an entire book specific to games dev, but there is a book on the standard library containers & algorithms. There is an article in one of the game programming gem series that shows the basics of it & using it.

[Edited by - snk_kid on July 2, 2005 2:51:37 PM]

Share this post


Link to post
Share on other sites
Ok, thanks. I guess I need to dive into that damn thing myself. Hope it's not too hard to handle...

Share this post


Link to post
Share on other sites
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!