Shop top categories that ship internationally
Buy used:
$19.00
Delivery Monday, February 3
Or fastest delivery Wednesday, January 29. Order within 5 hrs 30 mins
Used: Very Good | Details
Sold by JPolygon
Condition: Used: Very Good
Access codes and supplements are not guaranteed with used items.
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Other sellers on Amazon
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

The C++ Standard Library: A Tutorial and Reference 1st Edition

4.4 4.4 out of 5 stars 127 ratings

There is a newer edition of this item:

C++ Standard Library, The: A Tutorial and Reference
$38.86
(219)
Only 1 left in stock - order soon.
Complete and comprehensive coverage is given of the full ANSI/ISO C++ standard.

Editorial Reviews

Amazon.com Review

Programming with the C++ Standard Library can certainly be difficult, but Nicolai Josuttis's The C++ Standard Library provides one of the best available guides to using the built-in features of C++ effectively.

The C++ Standard Library provides plenty of default functionality in the form of the Standard Template Library (STL) for containers (like vectors and linked lists), as well as generic algorithms (which allow you to sort, search, and manipulate elements inside containers). The best thing about The C++ Standard Library is that it gives the reader a concise guide to working with these basic containers (from lists to sets and maps, with everything in between). Each container type is explained along with short code excerpts. Moreover, in a reference section, the author explores the connections between each container type, showing how they share similar methods. (Learn just a few methods and you can pretty much work with them all.)

In addition to STL, this book excels at providing a readable introduction to the generic algorithms (which can be used to sort, search, and otherwise manipulate STL containers). Other books either fold this material in with the explanation of containers or make it seem like an esoteric topic. The fact is, generic algorithms work with all the STL types, and by separating these algorithms out like this the reader can learn the rich array of algorithms available in today's standard C++. While this book concentrates on STL and algorithms, readers will still find great coverage on Standard Library string classes and streams (including a fine section on internationalization and locales).

For the beginning or intermediate C++ programmer, The C++ Standard Library can be a real timesaver. It arranges and explains the complexities of the C++ Standard Library and STL in a manageable format that's great as a reference and as an approach to programming. --Richard Dragan

Topics covered: history of C++ and the Standard Library, template basics, Big-O Notation, the std namespace, standard exceptions, allocators, standard library utilities, pairs and auto_ptr, numeric limits, the Standard Template Library (STL) basics, containers, iterators, algorithms, vectors, lists, deques, strings, sets, multisets, bitsets, maps, multimaps, stacks, queues, iterator adapters, function objects, element requirements, value and reference semantics, complex numbers, valarrays, stream classes, stream manipulators and formatting, file I/O, internationalization, and locales.

From the Inside Flap

In the beginning, I only planned to write a small German book (400 pages or so) about the C++ Standard Library. That was in 1993. Now, in 1999 you see the result--an English book with more than 800 pages of facts, figures, and examples. My goal is to describe the C++ Standard Library so that all (or almost all) your programming questions are answered before you think of the question. Note, however, that this is not a complete description of all aspects of the C++ Standard Library. Instead, I present the most important topics necessary for learning and programming in C++by using its standard library.

Each topic is described based on the general concepts;this discussion then leads to the specific details needed to support everyday programming tasks. Specific code examples are provided to help you understand the concepts and the details.

That's it--in a nutshell. I hope you get as much pleasure from reading this book as I did from writing it. Enjoy! Acknowledgments

This book presents ideas, concepts,solutions, and examples from many sources. In a way it does not seem fair that my name is the only name on the cover. Thus, I'd like to thank all the people and companies who helped and supported me during the past few years.

First, I'd like to thank Dietmar Kuhl. Dietmar is an expert on C++, especially on input/output streams and internationalization (he implemented an I/O stream library just for fun). He not only translated major parts of this book from German to English, he also wrote sections of this book using his expertise. In addition, he provided me with invaluable feedback over the years.

Second, I'd like to thank all the reviewers and everyone else who gave me their opinion. These people endow the book with a quality it would never have had without their input. (Because the list is extensive, please forgive me for any oversight.) The reviewers for the English version of this book included Chuck Allison, Greg Comeau, James A. Crotinger, Gabriel Dos Reis, Alan Ezust, Nathan Meyers, Werner Mossner, Todd Veldhuizen, Chichiang Wan, Judy Ward, and Thomas Wikehult. The German reviewers included Ralf Boecker, Dirk Herrmann, Dietmar Kuhl, Edda Lorke, Herbert Scheubner, Dominik Strasser, and Martin Weitzel. Additional input was provided by Matt Austern, Valentin Bonnard, Greg Colvin, Beman Dawes, Bill Gibbons, Lois Goldthwaite, Andrew Koenig, Steve Rumbsby, Bjarne Stroustrup, and David Vandevoorde.

Special thanks to Dave Abrahams, Janet Cocker, Catherine Ohala, and Maureen Willard who reviewed and edited the whole book very carefully. Their feedback was an incredible contribution to the quality of this book.

A special thanks goes to my "personal living dictionary"--Herb Sutter--the author of the famous "Guru of the Week" (a regular series of C++ programming problems that is published on the comp.std.c++.moderated Internet newsgroup).

I'd also like to thank all the people and companies who gave me the opportunity to test my examples on different platforms with different compilers. Many thanks to Steve Adamczyk, Mike Anderson, and John Spicer from EDG for their great compiler and their support. It was a big help during the standardization process and the writing of this book. Many thanks to P. J. Plauger and Dinkumware, Ltd, for their early standard-conforming implementation of the C++ Standard Library. Many thanks to Andreas Hommel and Metrowerks for an evaluative version of their CodeWarrior Programming Environment. Many thanks to all the developers of the free GNU and egcs compilers. Many thanks to Microsoft for an evaluative version of Visual C++. Many thanks to Roland Hartinger from Siemens Nixdorf Informations Systems AG for a test version of their C++ compiler. Many thanks to Topjects GmbH for an evaluative version of the ObjectSpace library implementation.

And, of course many thanks for those who invented, designed, or implemented C++ or parts of the library. Among others are Bjarne Stroustrup, Alexander Stepanov, Meng Lee, Matt Austern, Boris P. Fomichev, and all the other guys who wrote the SGI STL and the STLport.

Many thanks to everyone from Addison Wesley Longman who worked with me. Among others this includes Janet Cocker, Mike Hendrickson, Debbie Lafferty, Marina Lang, Chanda Leary, Catherine Ohala, Marty Rabinowitz, Susanne Spitzer,and Maureen Willard. It was fun.

In addition, I'd like to thank the people at BREDEX GmbH and all the people in the C++ community, particularly those involved with the standardization process, for their support and patience (sometimes I ask really silly questions).

Last but not least, many thanks and kisses for my family: Ulli, Lucas, Anica, and Frederic. I definitely did not have enough time for them due to the writing of this book.

Have fun and be human!

About this Book

Soon after its introduction, C++ became a de facto standard in object-oriented programming. This led to the goal of standardization. Only by having a standard, could programs be written that would run on different platforms--from PCs to mainframes. Furthermore, a standard C++ library would enable programmers to use general components and a higher level of abstraction without losing portability, rather than having to develop all code from scratch.

The standardization process was started in 1989 by an international ANSI/ISO committee. It developed the standard based on Bjarne Stroustrup's books (The C++ Programming Language) and (The Annotated C++ Reference Manual). After the standard was completed in 1997,several formal motions by different countries made it an international ISO and ANSI standard in 1998. The standardization process included the development of a C++ Standard Library. The library extends the core language to provide some general components. By using C++'s ability to program new abstract and generic types, the library provides a set of common classes and interfaces. This gives programmers a higher level of abstraction. The library provides the ability to use string types, different data structures (such as dynamic arrays, linked lists, and binary trees), different algorithms (such as different sorting algorithms), numeric classes, input/output (I/O) classes, and classes for internationalization support.

All of these are supported by a fairly simple programming interface. These components are very important for many programs. These days, data processing often means inputting, computing, processing, and outputting large amounts of data, which are often strings.

The library is not self-explanatory. To use these components and to benefit from their power,you need a good introduction that explains the concepts and the important details instead of simply listing the classes and their functions. This book is written exactly for that purpose. First, it introduces the library and all of its components from a conceptional point of view. Next, it describes the details needed for practical programming. Examples are included to demonstrate the exact usage of the components. Thus, this book is a detailed introduction to the C++ library for both the beginner and the practical programmer. Armed with the data provided herein, you should be able to take full advantage of the C++ Standard Library.

Caveat

I don't promise that everything described is easy and self-explanatory. The library provides a lot of flexibility,but flexibility for nontrivial purposes has a price. Beware that the library has traps and pitfalls,which I point out when we encounter them and suggest ways of avoiding them.

What You Should Know Before Reading this Book

To get the most from this book you should already know C++. (The book describes the standard components of C++, but not the language itself.) You should be familiar with the concepts of classes, inheritance,templates, and exception handling. However, you don't have to know all of the minor details about the language. The important details are described in the book (the minor details about the language are more important for people who want to implement the library rather than use it). Note that the language has changed during the standardization process,so your knowledge might not be up to date.

The section on newlang features provides a brief overview and introduction of the latest language features that are important for using the library. You should read this section if you are not sure whether you know all the new features of C++ (such as the keyword {\tt typename} and the concept of namespaces).

Style and Structure of the Book

The C++ Standard Library provides different components that are somewhat but not totally independent of each other,so there is no easy way to describe each part without mentioning others. I considered several different approaches for presenting the contents of this book. One was on the order of the C++ standard. However, this is not the best way to explain the components of the C++ Standard Library from scratch. Another was to start with an overview of all components followed by chapters that provided more details. Alternatively, I could have sorted the components, trying to find an order that had a minimum of cross-references to other sections. My solution was to use a mixture of all three approaches.

I start with a brief introduction of the general concepts and the utilities that are used by the library. Then, I describe all the components, each in one or more chapters. The first component is the standard template library (STL). There is no doubt that the STL is the most powerful, most complex, and most exciting part of the library. Its design influences other components heavily. Then I describe the more self-explanatory components, such as special containers, strings,and numeric classes. The next component discussed is one you probably know and use already: the iostreamlib{}. It is followed by a discussion of internationalization, which had some influence on the iostreamlib{}.

Each component description begins with the component's purpose, design, and some examples. Next, a detailed description follows that begins with different ways to use the component, as well as any traps and pitfalls associated with it. The description usually ends with a reference section, in which you can find the exact signature and definition of a component's classes and its functions.

How to Read this Book

This book is a mix of introductory user's guide and structured reference manual regarding the C++ Standard Library. The individual components of the C++ Standard Library are independent of each other, to some extent, so after reading Chapters 2 through 4 you could read the chapters that discuss the individual components in any order. Bear in mind,that Chapters 5 through 9 all describe the same component. To understand the other STL chapters, you should start with the introduction to the STL in chapter 5.

If you are a C++ programmer who wants to know, in general, the concepts and all parts of the library, you could simply read the book from the beginning to the end. However, you should skip the reference sections (which usually are named something like "...{} in detail}"). To program with certain components of the C++ Standard Library, the best way to find something is to use the index. I have tried to make the index very comprehensive to save you time when you are looking for something.

I can't explain all aspects at the same time, so you will find many cross references. It is always a problem to decide whether to follow them. If the cross reference refers to a section that will follow soon, take it as hint that I return to an aspect later. You should follow the cross reference only if you are searching for certain aspects or details and the cross reference seems to lead to details concerning your problem or its solution.

In my experience, the best way to learn something new is to look at examples. Therefore, you'll find a lot of examples throughout the book. They may be a few lines of code or complete programs. In the latter case, you'll find the name of the file containing the program's first comment line. You can find the files on the Internet at my Web site josuttis/libbook/.

State of the Art

While I was writing this book,the C++ standard was completed. Please bear in mind that some compilers might not yet confirm to it. This will most likely change in the near future. As a consequence, you might discover that not all things covered in this book work as described on your system,and you may have to change example programs to fit your specific environment. I can compile almost all example programs with version 2.Example Code and Additional Information

You can access all example programs and acquire more informations about this book and the C++ Standard Library from my Web site at josuttis/libbook/. Please read the {\tt README} file for further details. Also, you can find a lot of additional information about this topic on the Internet. See Internet Resources on page 743 for details.

Feedback

I welcome your feedback (good and bad) on this book. I tried to prepare it carefully; however, I'm human, and at some time I have to stop writing and tweaking. So, you may find some errors, inconsistencies, or subjects that could be described better. Your feedback will give me the chance to improve later editions. The best way to reach me is by Email: libbook@josuttis.

You can also reach me by phone, fax, or "snail" mail:
Nicolai M. Josuttis
Berggarten 9
D--38108
Braunschweig
Germany
Phone: +49 5309 5747
Fax: +49 5309 5774

Many thanks.

0201379260P04062001

Product details

  • Publisher ‏ : ‎ Addison-Wesley Professional; 1st edition (January 1, 1999)
  • Language ‏ : ‎ English
  • Hardcover ‏ : ‎ 799 pages
  • ISBN-10 ‏ : ‎ 0201379260
  • ISBN-13 ‏ : ‎ 978-0201379266
  • Item Weight ‏ : ‎ 3.3 pounds
  • Dimensions ‏ : ‎ 1.5 x 7.75 x 9.5 inches
  • Customer Reviews:
    4.4 4.4 out of 5 stars 127 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Nicolai M. Josuttis
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Discover more of the author’s books, see similar authors, read book recommendations and more.

Customer reviews

4.4 out of 5 stars
127 global ratings

Review this product

Share your thoughts with other customers

Top reviews from the United States

  • Reviewed in the United States on March 28, 2007
    Yes it's long, but I have found this book faster to make use of than shorter books on the topic of the Standard Template library (STL). This is the book you want.

    Read Ch 2, scan Ch 3. Ch 4 can wait, page through, don't read Ch 5. Read Ch 6 and just note how iterators can be used in Ch 7. And you are done. This can be done in under 3 hours. Then use the rest of the book just as a reference as needed and you will be an STL user eventual expert.

    After using STL, you will never go back -- it transforms C++ into a useful language rather than a memory management sink hole. Oh, then you will want to go on to the new proposed, but not yet accepted (as of March 2007) standard library extensions. For that, see "The C++ Standard Library Extensions" by Pete Becker The C++ Standard Library Extensions: A Tutorial and Reference

    What do the extensions (sometimes known as "Boost" library) add that's missing in STL? Well, Hash functions (how could these have been left out?), tuples rather than just pairs. Pairs in STL allow you to treat items as a unit -- very useful for database and pattern recognition/association for example. Tuples extend this to lists of items. Pointers with reference counting -- Speed up your code by easily avoiding needless copying and have the memory auto delete when all references to it go away. Doesn't solve the problem of "fatal embraces" where references point to each other, but it helps a lot.

    What's still missing? By now, decision trees are just so mature and useful that they ought to be built in along with statistical boosting, k-means and agglomerative clustering, K-D trees for nearest neighbor association. That is IMHO, data ought not only allow methods to be attached, but clustering and basic machine learning/prediction should just be built in and standard by now. The above routines are mature and a basis of much more advanced routines.
    10 people found this helpful
    Report
  • Reviewed in the United States on December 9, 2004
    I'm an undergraduate computer engineering student. I purchased this book to learn how C++ library-based programming is done in the real world, not in the classroom where we must reinvent the wheel for every project.

    I was skeptical when I read the other reviews, but I am extremely impressed with this book. I have not had the chance to sit down and read the book cover to cover yet. However, I have cracked it open a few times when I've gotten stuck, and have been amazed that I have been able to quickly and effortlessly find clear, concise, and thorough answers to every STL question that I've had.

    The book is extremely well written: it's well structured, well indexed, and easy to digest. Extremely cost effective.

    On a side note, I'm finding it to be an excellent supplement to my data structures & algorithm course's text: the STL is full of innovative, refined, tried and true approaches, whereas the course text presents things coarsely via mechanisms that the author implemented on his own for the sake of his book.
    6 people found this helpful
    Report
  • Reviewed in the United States on January 5, 2013
    THE BOOK on the C++ language of course is "The C++ Programming Language" by Bjarne Stroustrup. However looking into a second, third or nth additional point of view into a subject can be an enlightening experience.

    Just flipping through the table of contents and chapters very briefly, I wouldn't reccomend this book for a beginner to computer science or software engineering. It does however appear to be a decent supplamentary text to Saint Stroustrup's say on the subject.

    During my very brief flipping through the pages I noticed that Nicolai Josuttis used some new/different vocabulary on the (same) subjects that Bjarne covered. Learning new vocabulary of course is a good thing and the key for success in whatever study it is you're doing.

    While it will be a welcome addition to my shelf, it isn't going to replace anything in my yearly cycle of reading materail. For that I recommend, Saint Bjarne Stroustrup (anything by him), Scott Meyers (2nd/3rd of Effective C++ and More Effective C++), K&R (The C Programming Language), Gang of Four (Design Patterns), and material on whatever Frameworks/Libraries/Environments you're currently programming in (for me, Windows/Petzold at the moment, but Hadoop CentOS/map/reduce in the future).

    Still, this book will get a once over and I'm happy to say I should be better off for it.
    One person found this helpful
    Report
  • Reviewed in the United States on January 10, 2002
    This book rocks. I learned C++ during the tumultuous years before standardization, then forgot the language due to lack of use in my job. Now that I am re-learning the language, I find that a lot has changed. Vague recollections of the way things worked often led me down the wrong path. C++ today is not the C++ I remember studying, to say the least.
    Josuttis has cleared up all my questions and misunderstandings about Standard C++. Within the book are short sample programs illustrating how to use library components as well as clear, descriptive text on the objects in the Standard Library. Features are intelligently divided into chapters, which has, more than once, resulted in me finding a very novel way to solve a problem I only had a rough idea on how to solve.
    Since buying this book, Stroustrup has sat idle on my bookshelf, and Lippman - well, Lippman's at work. Josuttis has made the C++ Standard Library much more accessible, making my transition from forgotten pre-standard C++ to Standard C++ much less painful than I expected.
    5 people found this helpful
    Report
  • Reviewed in the United States on January 17, 2019
    This may be what others are looking for, but in my mind it very poor as a reference book.

Top reviews from other countries

  • Addictive Tendencies
    5.0 out of 5 stars A definitive work
    Reviewed in the United Kingdom on March 10, 2006
    I'm a professional C++ developer with over 10 years commercial experience of C++ and still use this book on a regular basis as a reference for STL / Standard Library.
    Don't be put off by the fact that this book was published in 1999 and is still in its 1st edition as each reprint of the book contains corrections - you only need to go to Josuttis' website to see errata listed for "the 14th and later printings". I have the 4th printing and the errata is huge - maybe it's time to buy a new copy. :o)
    I would highly recommend this book to anyone who uses STL / Standard Library on a regular basis.
  • Father-of-girls
    5.0 out of 5 stars Five Stars
    Reviewed in the United Kingdom on October 13, 2017
    Essential for the progammer's bookshelf. For me, the book is not always open, but it's always to hand.
  • Dimo Dimov
    5.0 out of 5 stars Five Stars
    Reviewed in the United Kingdom on February 25, 2018
    Bought for a programmer by trade so I guess it's good
  • Murga
    5.0 out of 5 stars Good one
    Reviewed in the United Kingdom on April 7, 2011
    Though i have not had a very deep look to give a review on the book, i am more than happy with the packing and sending of the product in time.