Amazon.com: STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition) (9780201379235): David R. Musser, Gillmer J. Derge, Atul Saini: Books

Buy Used
Used - Like New See details
$9.16 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition)
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

STL Tutorial and Reference Guide: C++ Programming with the Standard Template Library (2nd Edition) [Hardcover]

David R. Musser (Author), Gillmer J. Derge (Author), Atul Saini (Author)
3.3 out of 5 stars  See all reviews (27 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for students on millions of items. Learn more

Formats

Amazon Price New from Used from
Hardcover --  
Hardcover, April 6, 2001 --  
Paperback $35.38  

Book Description

April 6, 2001 0201379236 978-0201379235 2

"The second edition is clearer and adds more examples on how to use STL in a practical environment. Moreover, it is more concerned with performance and tools for its measurement. Both changes are very welcome."
--Lawrence Rauchwerger, Texas A&M University
"So many algorithms, so little time! The generic algorithms chapter with so many more examples than in the previous edition is delightful! The examples work cumulatively to give a sense of comfortable competence with the algorithms, containers, and iterators used."
--Max A. Lebow, Software Engineer, Unisys Corporation

The STL Tutorial and Reference Guide is highly acclaimed as the most accessible, comprehensive, and practical introduction to the Standard Template Library (STL). Encompassing a set of C++ generic data structures and algorithms, STL provides reusable, interchangeable components adaptable to many different uses without sacrificing efficiency. Written by authors who have been instrumental in the creation and practical application of STL, STL Tutorial and Reference Guide, Second Edition includes a tutorial, a thorough description of each element of the library, numerous sample applications, and a comprehensive reference.

You will find in-depth explanations of iterators, generic algorithms, containers, function objects, and much more. Several larger, non-trivial applications demonstrate how to put STL's power and flexibility to work. This book will also show you how to integrate STL with object-oriented programming techniques. In addition, the comprehensive and detailed STL reference guide will be a constant and convenient companion as you learn to work with the library.

This second edition is fully updated to reflect all of the changes made to STL for the final ANSI/ISO C++ language standard. It has been expanded with new chapters and appendices. Many new code examples throughout the book illustrate individual concepts and techniques, while larger sample programs demonstrate the use of the STL in real-world C++ software development. An accompanying Web site, including source code and examples referenced in the text, can be found at http://www.cs.rpi.edu/~musser/stl-book/index.html.



0201379236B05212001



Editorial Reviews

From the Inside Flap

In the five years since the first edition of STL Tutorial and Reference Guide appeared, the C++ language standard has been finalized and officially accepted, C++ compiler vendors have made great progress in bringing their compilers into compliance with the standard, and dozens of other books and magazine articles have appeared that describe and explain the standardized language and libraries. Many of these books and articles have highlighted the Standard Template Library (STL) as the most significant addition to the standard. Some hailed it, as we did in this book's first edition, as having the potential to revolutionize the way a large number of people program. The past five years have already seen much of that potential realized, with the first edition of this book playing a key role for tens of thousands of programmers. We wrote in the preface of the first edition that there are five reasons why the STL components could become some of the most widely used software in existence:

C++ is becoming one of the most widely used programming languages (in large part due to the support it provides for building and using component libraries). Since STL has been incorporated into the ANSI/ISO standard for C++ and its libraries, compiler vendors are making it part of their standard distributions. All components in STL are generic, meaning that they are adaptable (by language-supported compile-time techniques) to many different uses. The generality of STL components has been achieved without sacrificing efficiency. The design of STL components as fine-grained, interchangeable building blocks makes them a suitable basis for further development of components for specialized areas such as databases, user interfaces, and so forth.

We have enjoyed seeing these statements borne out by the developments of

the past five years.

Changes in the Second Edition

In this new edition we have added substantially more tutorial material including expanded chapters in Part I on function objects and container, it-

erator, and function adaptors, and two entirely new chapters in Part II

containing substantial new examples. We have also gone through all example code and surrounding discussion, including the reference material in

Part III, to bring them up to date with the final standard. (Although some

ambiguities in the standard have been discovered since it was finalized, we

believe that in most cases the remaining uncertainties about the meaning

of STL component specifications have no important consequences for the

practicing programmer. In the few cases where they might, we point them

out.) We also added a new chapter in Part III describing utility components

such as the pair and comparison classes, and a new appendix describing the

STL-related features of the standard string class.

In this edition we have also adopted the "literate programming" style

for presenting example programs and code fragments. For readers unfamiliar with this approach to simultaneous programming and documenting,

a brief explanation is given in Chapter 2 and more details are presented

in Chapter 12. One benefit of the literate programming approach is that

coding details can be presented once and then referred to (by name and

page number) many times, so readers do not have to read through the same

details repeatedly. Another major benefit is that we have been able check

even more thoroughly than before that all code is syntactically and logically

correct, since literate programming tools make it easy to extract the code

directly from the manuscript and compile and test it. A list of the compilers

the code has been compiled and tested with is given in Appendix D.

Some History, from the Preface to the First Edition

Virtually all C++ programmers know that this language was originated by

one person, Bjarne Stroustrup, who began thinking of how to extend the C

language to support definition of classes and objects as early as 1979. So

too, the architecture of STL is largely the creation of one person, Alexander

Stepanov.

It is interesting that it was also in 1979, at about the same time as

Stroustrup's initial research, that Alex began working out his initial ideas

of generic programming and exploring their potential for revolutionizing

software development. Although Dave Musser had developed and advocated some aspects of generic programming as early as 1971, it was limited

to a rather specialized area of software development (computer algebra).

Alex recognized the full potential for generic programming and persuaded

his then-colleagues at General Electric Research and Development (including, primarily, Dave Musser and Deepak Kapur) that generic programming

should be pursued as a comprehensive basis for software development. But

at that time there was no real support in any programming language for

generic programming. The first major language to provide such support

was Ada, with its generic units feature, and by 1987 Dave and Alex had

developed and published an Ada library for list processing that embodied

the results of much of their research on generic programming. However, Ada

had not achieved much acceptance outside the defense industry, and C++

seemed more likely to become widely used and provide good support for

generic programming, even though the language was relatively immature (it

did not even have templates, added only later). Another reason for turning

to C++, which Alex recognized early on, was that the C/C++ model of

computation, which allows very flexible access to storage (via pointers), is

crucial to achieving generality without losing efficiency.

Still, much research and experimentation were needed, not just to develop individual components, but more important to develop an overall ar-

chitecture for a component library based on generic programming. First at

AT&T Bell Laboratories and later at Hewlett-Packard Research Labs, Alex

experimented with many architectural and algorithm formulations, first in

C and later in C++. Dave Musser collaborated in this research, and in 1992

Meng Lee joined Alex's project at HP and became a major contributor.

This work undoubtedly would have continued for some time as just a

research project or at best would have resulted in an HP proprietary library,

if Andrew Koenig of Bell Labs had not become aware of the work and asked Alex to present the main ideas at a November 1993 meeting of the

ANSI/ISO committee for C++ standardization. The committee's response

was overwhelmingly favorable and led to a request from Andy for a formal

proposal in time for the March 1994 meeting. Despite the tremendous time

pressure, Alex and Meng were able to produce a draft proposal that received

preliminary approval at that meeting.

The committee had several requests for changes and extensions (some of

them major), and a small group of committee members met with Alex and

Meng to help work out the details. The requirements for the most significant extension (associative containers) had to be shown to be consistent by

fully implementing them, a task Alex delegated to Dave Musser. It would

have been quite easy for the whole enterprise to spin out of control at this

point, but again Alex and Meng met the challenge and produced a proposal

that received final approval at the July 1994 ANSI/ISO committee meeting.

(Additional details of this history can be found in an interview Alex gave in

the March 1995 issue of Dr. Dobb's Journal.)

Spreading the Word

Subsequently, the Stepanov and Lee document 17 was incorporated into

the ANSI/ISO C++ draft standard (1, parts of clauses 17 through 27). It

also influenced other parts of the C++ Standard Library, such as the string

facilities, and some of the previously adopted standards in those areas were

revised accordingly.

In spite of STL's success with the committee, there remained the question of how STL would make its way into actual availability and use. With

the STL requirements part of the publicly available draft standard, compiler

vendors and independent software library vendors could of course develop

their own implementations and market them as separate products or as selling points for their other wares. One of the first edition's authors, Atul

Saini, was among the first to recognize the commercial potential and began exploring it as a line of business for his company, Modena Software

Incorporated, even before STL had been fully accepted by the committee.

The prospects for early widespread dissemination of STL were considerably improved with Hewlett-Packard's decision to make its implementation

freely available on the Internet in August 1994. This implementation, developed by Stepanov, Lee, and Musser during the standardization process,

became the basis of all implementations offered by compiler and library

vendors today.

Also in 1994, Dave Musser and Atul Saini developed the STL++ Manual,

the first comprehensive user-level documentation of STL, but they soon

recognized that an even more comprehensive treatment of STL was needed,

one that would have better and more complete coverage of all aspects of the

library. In an attempt to meet this goal, and with much encouragement and

assistance from their editor, Mike Hendrickson, they wrote the first edition

of this book.

In the second edition, the two original authors are joined by Gillmer

J. Derge, President and CEO of the consulting firm Toltec Software Services, Inc. He has been developing applications with C++ for more than a

decade, including seven years with General Electric Corporate R&D, where

he received a Whitney Award for technical achievement.

Acknowledgments for the First Edition

We gratefully acknowledge the encouragement and assistance of many people. First and foremost, Alex Stepanov and Meng Lee offered continuous

encouragement and were always available to help straighten out any misconceptions we had about the design of the library. Invaluable assistance with

code development and testing was provided by several Modena staff members, including Atul Gupta, Kolachala Kalyan, and Narasimhan Rampalli.

Several reviewers of earlier drafts gave us much valuable feedback and helped

us find ways to present the most crucial ideas more clearly. They include

Mike Ballantyne, Tom Cargill, Edgar Chrisostomo, Brian Kernighan, Scott

Meyers, Larry Podmolik, Kathy Stark, Steve Vinoski, and John Vlissides.

Others who also made valuable suggestions include Dan Benanav, Bob Cook,

Bob Ingalls, Nathan Schimke, Kedar Tupil, and Rick Wilhelm. Finally, we

thank the team at Addison-Wesley for their expert editorial and production

assistance: Kim Dawley, Katie Duffy, Rosa Gonzalez, Mike Hendrickson,

Simone Payment, Avanda Peters, John Wait, and Pamela Yee.

Acknowledgments for the Second Edition

For assistance with this edition, we wish first of all to thank the review-

ers for pointing out errors in the discussion and examples and suggesting

many other improvements in the presentation. The extensive comments of

Max A. Lebow, Lawrence Rauchwerger, and Jan Christiaan van Winkel were

especially helpful. We also thank Deborah Lafferty, our editor, and Julie DeBaggis, who served as editor during the early planning of the second edition.

Several other members of the production and marketing teams at Addison-Wesley helped in many ways, including Jacquelyn Doucette, Chanda Leary-

Coutu, Curt Johnson, Jennifer Lawinski, and Marty Rabinowitz.

D.R.M.

Loudonville, NY

G.J.D.

Cohoes, NY

A.S.

Los Gatos, CA

October 2000

0201379236P04062001

From the Back Cover

"The second edition is clearer and adds more examples on how to use STL in a practical environment. Moreover, it is more concerned with performance and tools for its measurement. Both changes are very welcome."
--Lawrence Rauchwerger, Texas A&M University

"So many algorithms, so little time! The generic algorithms chapter with so many more examples than in the previous edition is delightful! The examples work cumulatively to give a sense of comfortable competence with the algorithms, containers, and iterators used."
--Max A. Lebow, Software Engineer, Unisys Corporation

The STL Tutorial and Reference Guide is highly acclaimed as the most accessible, comprehensive, and practical introduction to the Standard Template Library (STL). Encompassing a set of C++ generic data structures and algorithms, STL provides reusable, interchangeable components adaptable to many different uses without sacrificing efficiency. Written by authors who have been instrumental in the creation and practical application of STL, STL Tutorial and Reference Guide, Second Edition includes a tutorial, a thorough description of each element of the library, numerous sample applications, and a comprehensive reference.

You will find in-depth explanations of iterators, generic algorithms, containers, function objects, and much more. Several larger, non-trivial applications demonstrate how to put STL's power and flexibility to work. This book will also show you how to integrate STL with object-oriented programming techniques. In addition, the comprehensive and detailed STL reference guide will be a constant and convenient companion as you learn to work with the library.

This second edition is fully updated to reflect all of the changes made to STL for the final ANSI/ISO C++ language standard. It has been expanded with new chapters and appendices. Many new code examples throughout the book illustrate individual concepts and techniques, while larger sample programs demonstrate the use of the STL in real-world C++ software development. An accompanying Web site, including source code and examples referenced in the text, can be found at http://www.cs.rpi.edu/~musser/stl-book/index.html.



0201379236B07092001

Product Details

  • Hardcover: 560 pages
  • Publisher: Addison-Wesley Professional; 2 edition (April 6, 2001)
  • Language: English
  • ISBN-10: 0201379236
  • ISBN-13: 978-0201379235
  • Product Dimensions: 9.5 x 7.7 x 1.5 inches
  • Shipping Weight: 3 pounds
  • Average Customer Review: 3.3 out of 5 stars  See all reviews (27 customer reviews)
  • Amazon Best Sellers Rank: #1,351,987 in Books (See Top 100 in Books)

More About the Authors

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

27 Reviews
5 star:
 (11)
4 star:
 (4)
3 star:
 (2)
2 star:
 (3)
1 star:
 (7)
 
 
 
 
 
Average Customer Review
3.3 out of 5 stars (27 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

38 of 41 people found the following review helpful:
5.0 out of 5 stars incorrect reviews, November 3, 2000
Just a few more points, to refute earlier incorrect reviews:

One reviewer said: "For instance, in the detailed presentation of sets and multisets, nowhere is it mentioned what the difference between the two is. You have to go to the "Overview of STL components" to get the information."

This is incorrect: the authors cover the difference numerous places (and most people can guess what the difference is). See for example pages 118 and 151 (the latter being the section explaining set, multiset, and map).

Another reviewer said: "...it fails to mention several large chunks of STL that you could immediately use, including the functionals and some very useful pieces (strings (with iostreams), bit sets, fstreams, locales, limits, etc)."

This also is incorrect and misleading. Most of the items above are not part of STL, but rather the standard C++ library, so of course the authors don't discuss them. Also, presumably by "functionals" the reviewer means function objects, or function adaptors. Both of these are well coevered in the book.

Another review stated: "If you look for some concrete examples then this book isn't it."

This is hard to accept: almost every page of this book contains carefully chosen example code illustrating the point at hand. Even a little imagination should suffice to adapt it to your particulars.

And finally: "While this book might help you use STL containers in straightforward circumstances, it doesn't contain enough theory to give you mastery of the topic."

Also hard to accept. This book covers as much theory as there is to present; there aren't any higher level ideas than those presented here. For example, they take great pains to explain why there is a separation of algorithm and data structure, and to illustrate the pivotal role iterators play in organizing the library, to ensure (mostly) that the right algorithms are used with the right containers. If one looks for even deeper meaning, well, most of us don't know any, so feel free to write a book on it when you find it.

Seems like people are really biased against this book. Again, it's a really good introduction to the fundamentals. Sorry to see it get trashed.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


28 of 32 people found the following review helpful:
5.0 out of 5 stars Well-written coverage of most of what you need to know, November 3, 2000
I'm astonished by the abundance of IMO very ignorant reviews of this book. 4.5 stars might be the ideal rating, but given all the other excessively negative reviews, I opted for 5 rather than 4.

This is a lucid, very well-written book, with plenty of sage advice. It introduces the concepts gently, but without excessive redundancy or hand-holding. The examples are well chosen, and illustrate their points (although in some places, there is a bit much duplication for my taste, but that too serves to illustrate the uniformity of STL). This book is clear, to the point, and covers most of the essential subjects amply (it's s bit weak on storage management, but as the authors mention, rarely will you need to write your own allocators). And it includes a minimal - but perfectly functional and adequate - reference section. The presentation is well organized, and procedes at a moderate pace.

As one who has written a couple data structure libraries of his own, and who has taken to heart (in spite of C++ being a mess of a language, and templates being fundamentally a kludge) the sophistication of STL, I can safely say it incorporates many ideas that other programmers need to know, and probably do not appreciate fully. This book does a good job explaining some of the deeper motivations behind STL's design. As they say, a true master makes it look simple, and that's what both the authors of STL and this book achieve.

It is true that the book is slightly out of date, but not with regard to the fundamentals. All of the key ideas you learn from this book apply to the latest revisions and any programmer worth his weight in, uh, salt can easily figure out the minor differences.

I recommend this book to those who like insight, and succinct clarity, and who eschew the typical computer book, full of facts, hype, and verbosity, but little illumination, progressing by baby steps. This is a good solid book that will get you up to speed quickly on all the important ideas in STL, and many of its basic usage idioms.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


20 of 22 people found the following review helpful:
2.0 out of 5 stars There's better out there, November 1, 1999
By A Customer
The book itself isn't that bad. It is a good high level tutorial without too much detail. However, if you want a tutorial and reference that is more up to date I'd recommend checking out The C++ Standard Library: A Tutorial and Reference. It was recently published and covers a broader scope (the whole standard library, not just the STL).
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews




Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(1)
(1)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums





Look for Similar Items by Category


Look for Similar Items by Subject