Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > STL containers book recommendation?

Reply
Thread Tools

STL containers book recommendation?

 
 
Markus Dehmann
Guest
Posts: n/a
 
      05-22-2005
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!

 
Reply With Quote
 
 
 
 
Donovan Rebbechi
Guest
Posts: n/a
 
      05-22-2005
On 2005-05-22, Markus Dehmann <(E-Mail Removed)> wrote:
> 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,
--
Donovan Rebbechi
http://pegasus.rutgers.edu/~elflord/
 
Reply With Quote
 
 
 
 
ShaneG
Guest
Posts: n/a
 
      05-22-2005

Markus Dehmann wrote:
> 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.

 
Reply With Quote
 
Rapscallion
Guest
Posts: n/a
 
      05-22-2005
Markus Dehmann wrote:
> 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?


http://www.informatik.hs-bremen.de/~brey/stlbe.html
http://www.informatik.hs-bremen.de/~brey/stlb.html

 
Reply With Quote
 
Jerry Coffin
Guest
Posts: n/a
 
      05-23-2005
Markus Dehmann wrote:
> 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

--
Later,
Jerry.

The universe is a figment of its own imagination.

 
Reply With Quote
 
ShaneG
Guest
Posts: n/a
 
      05-23-2005
"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).

 
Reply With Quote
 
Ioannis Vranos
Guest
Posts: n/a
 
      05-23-2005
Markus Dehmann wrote:

> 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).



--
Ioannis Vranos

http://www23.brinkster.com/noicys
 
Reply With Quote
 
ShaneG
Guest
Posts: n/a
 
      05-23-2005
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++.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Are sequence containers not a subset of general containers? Sebastian Mach C++ 5 10-06-2012 07:54 PM
nested stl containers - aliasing stl objects without invokingoperator= Andrey Vul C++ 6 10-22-2009 09:00 AM
Containers of iterators vs. containers of references clark.coleman@att.net C++ 7 01-25-2008 01:37 PM
no ABC's in STL containers.. Sean C++ 1 07-10-2003 05:08 AM
sorting with STL containers containing objects of different subclasses Koen C++ 1 06-30-2003 03:51 PM



Advertisments