views:

436

answers:

3

I am preparing for a programming competition in witch we solve programming problems in c++.

Looking at the former year solutions, they seem quite easy (not more than ~30 lines of code). I realised that they are widely using the STL for easy manipulating - vectors, sets, maps, lists and also the algorithms available in STL.

Any site for beginners like me who want to learn the features of STL and its use in solving problems ?

Thank you in advance.

+15  A: 

Two books come to mind: Josuttis's The C++ Standard Library (and his page for it), and Meyers's Effective STL

Novelocrat
+1 for Scott Meyers - all his books are excellent. Must reads for all C++ developers
duffymo
+1 for Scott's book as well!
Rob Wells
+∞ These are the two books that anyone working with STL should have on their shelf. Meyers is a really quick read so buy it and read it. Josuttis is probably the best all around book on the STL.
D.Shawley
+1 for Josuttis. Its best for both beginner and expert level.
aJ
+1, Josuttis is the way to go
Naveen
+1  A: 

If you have some conception of non-STL C++ and specifically need to understand how STL's approaches correspond to non-STL ones, I recommend this tutorial.

Alex Martelli
No downvote for this, but I can't recommend that site to a new learner. It uses pre-standard headers, over a decade later.
Novelocrat
@Novelcrat: It isn't for a 'new learner', it is for someone who already knows "C with classes" who wants to see how C++ with STL should look.
Nick Presta
I just read it, and it actually seems quite good despite the old style. I'm not sure it's particularly targeted at people who know "C with classes", so much as people who've had some introduction to C++. It also trails off at the end. At any rate, it's more valuable than my initial impression. +1 for linking it up.
Novelocrat
+10  A: 

As well as Scott Meyer's excellent book "Effective STL" which has been recommended above, I can't recommend highly enough the excellent book Accelerated C++ by Andrew Koenig and Barbara E. Moo.

The book starts by having you use STL very early in the book explaining their uses in the context of initially simple problems. This book treats C++ as its own language and not as C with bits bolted on, the mechanics of defining a class aren't explained until later in the book.

Rob Wells