Sign in to follow this  

STL question

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

This topic is 4546 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this