STL containers book recommendation?

M

Markus Dehmann

Is there a good book on STL containers and how to use the STL efficiently,
in general?

I often don't know if a map, hash_map (not STL?), or vector would be more
efficient. Or list? What is a deque? I'd like to learn when to use which
container. Can someone recommend a good book on this?

Thanks!
 
D

Donovan Rebbechi

Is there a good book on STL containers and how to use the STL efficiently,
in general?

I often don't know if a map, hash_map (not STL?), or vector would be more
efficient. Or list? What is a deque? I'd like to learn when to use which
container. Can someone recommend a good book on this?

Accelerated C++ is somewhat introductory, but it's certainly worth a read. Good
coverage of the basics. Effective STL (Meyers) is also a good one -- covers all
the little ins and outs of the library.
Cheers,
 
S

ShaneG

Markus said:
Is there a good book on STL containers and how to use the STL efficiently,
in general?

I often don't know if a map, hash_map (not STL?), or vector would be more
efficient. Or list? What is a deque? I'd like to learn when to use which
container. Can someone recommend a good book on this?

Thanks!

I'd recommend "The C++ Standard Library: A Tutorial and Reference" by
Nicolai M. Josuttis.
 
J

Jerry Coffin

Markus said:
Is there a good book on STL containers and how to use the STL
efficiently, in general?

I often don't know if a map, hash_map (not STL?), or vector would
be more efficient. Or list? What is a deque? I'd like to learn
when to use which container. Can someone recommend a good book on
this?

I see somebody has already mentioned Josuttis's book, which I think is
a fine suggestion. In addition, you might want to look at:

Effective STL Scott Meyers
published by Addison-Wesley ISBN 0-201-74962-9

STL Tutorial and Reference Guide, 2nd Ed. Musser, Saini, Derge
published by Addison-Wesley ISBN 0-201-37923-6

It isn't specifically devoted to the iterators/iterators/containers
part of the library (or even to the library) but you might also want to
look at:

C++ Common Knowledge Stephen Dewhurst
published by Addison-Wesley ISBN 0-321-32192-8
 
S

ShaneG

"STL Tutorial and Reference Guide" would also be a good choice.

While "Effective STL" and "C++ Common Knowledge" are both good books,
neither of them is attempting to be either a tutorial or a reference
for STL, but cover specific patterns and problems that are good to know
about once you already have a basic working knowledge (of both C++ and
the STL).

If you are new to STL, then one of the books that is more comprehensive
would be a better starting point (IMO).
 
I

Ioannis Vranos

Markus said:
Is there a good book on STL containers and how to use the STL efficiently,
in general?

I often don't know if a map, hash_map (not STL?), or vector would be more
efficient. Or list? What is a deque? I'd like to learn when to use which
container. Can someone recommend a good book on this?


Apart from the STL-specific books that others have recommended, "The C++ Programming
Language" 3rd Edition or Special Edition by Bjarne Stroustrup (the creator of C++), also
covers well the various containers and algorithms, and explains how to use them well, and
provides the various costs of containers and algorithms in Big-O notation (it also
provides a table of all container Big-O costs for various operations).
 
S

ShaneG

Yes, while this wouldn't necessarily be what I would recommend
specifically for coverage of STL topics, there is no question that you
should have a copy of this, and read through it if you are programming
in C++.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top