Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

The C++ Programming Language

Rate this book
In this brand-new third edition of The C++ Programming Language, author Bjarne Stroustrup, the creator of C++, presents the full specification for the C++ language and standard library, a spec that will soon become the joint ISO/ANSI C++ standard.

Past readers will find that the new edition has changed a great deal and grown considerably to encompass new language features, particularly run-time type identification, namespaces, and the standard library. At the same time, readers will recognize the lucid style and sensible advice that made previous editions so readable and enjoyable. Probably the biggest change is a substantial new section, well over 200 pages in length, covering the contents and design of the C++ standard library, the most important new feature of the C++ specification. The author has also added a substantial number of new exercises while keeping many from previous editions that have retained their value.

While The C++ Programming Language is not a C++ tutorial, strictly speaking, anyone learning the language, especially those coming from C, will greatly benefit from the clear presentation of all its elements. It is impossible to overstate the importance of this book for anyone who is serious about using C++.

1376 pages, Kindle Edition

First published January 1, 1986

659 people are currently reading
4,556 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1,702 (42%)
4 stars
1,300 (32%)
3 stars
749 (18%)
2 stars
205 (5%)
1 star
52 (1%)
Displaying 1 - 30 of 105 reviews
Profile Image for Heather Terran.
105 reviews
February 1, 2009
I've read the first, second, and third editions of this book. (Before I gave up my evil ways and switched to Java.) The most concise thing to say about the language can be summarized by placing the three volumes on the shelf next to each other. That makes it clear how much the scope of the language has expanded over time (approximately doubling on each edition). It's a sign of how tricky language design is -- Stroustrop was essentially forced to add some rather byzantine constructs over time to patch up non-obvious holes in the language that only emerged as it was more widely adopted. (For example, the hideous const_cast, static_cast, dynamic_cast, and the dangerously omnipotent reinterpret_cast.) The result is a language that had bloated out beyond its ideal simplicity into a tangle of syntax and semantics that early compilers couldn't even figure out.

With respect to the book itself, it's clearly written by a language designer, rather than a language user. It is not organized in a way to either teach the language or be a useful reference book to keep on your desk. But if you're implementing a compiler for C++ (may Thoth have mercy on your soul), then this is the place to start.

That said, it's as close to authoritative as it's possible to come, and it contains a lot of very valuable information. But what did really interest me, as I read it, are Stroustrop's thoughts on language design, objectives, and his justifications for why certain language features were introduced. (As ugly as some of them are, they are all there for a reason.) It's also an interesting case study in how good intentions can go awry because of unforseen consequences.
Profile Image for Michael Finocchiaro.
AuthorÌý3 books6,122 followers
February 5, 2017
Honestly, I kind of detest C++ as a language - too easy to write shitty code, too easy to lose pointers and leak memory, and it was kind of a hack to force object oriented programming onto C. All that being said, this is the C++ Bible by Stroustrup and had a vast impact on computing in the 90s and 2000s before Java and its many children and inspired cousins took over. Highly readable (for a geek computer language book), it is a nerd classic.
Profile Image for David Sarkies.
1,910 reviews361 followers
March 14, 2016
A Reference Manual for a Useful Computer Language
14 March 2016

Honestly, I'm not really sure why I ended up reading this book. Okay, part of it may have something to do with my interest in getting back into computer programming but considering that the only programming language I have ever used is BASIC (though you could also throw in Neverwinter Nights, namely because they did have a pretty sophisticated editing suite which allowed me an enormous amount of freedom when I spent three years of my life playing around with it) and C++ is probably not the first computer language somebody should jump into, especially an amateur like me. Still, I had mentioned it to my Dad and he leant me this book, suggesting that while I wouldn't be able to use it to actually learn the language (there are websites for that), it would give me an idea of how computer languages work.

Mind you, these days people don't even use BASIC anymore (yes, they do have Visual Basic, but with the development of the internet I've never had a need to go down that path, and anyway I wanted something that was a little more versatile than BASIC). I still remember back when I was a kid that the main languages, other than BASIC, were FORTRAN, PASCAL, C, and Assembler. These days you seem to have a plethora of languages that are being used, though C++ still seems to be a very popular one in many areas. Actually, it was interesting to see how some of the functions in Javascript have been lifted straight out of C++.

It was also interesting to learn that Stroustrup developed the language while working at Bell Technologies (the telephone company), though this wasn't outlined in the book. I thought it was a little odd that this was a language developed commercially, yet Bell doesn't seem to hold any rights over the use of the language. The fact that you don't even have to pay for a compiler also suggests that people don't have to pay money to Bell just to code in C++. As you probably guess, C++ is actually a reworking of an older language, namely C, and Stroustrup does spend some time outlining the differences.

As I have indicated, C++ isn't a language for beginners, and this certainly isn't the type of book that one would read to actually learn how to code in the language. Rather, he outlines the various aspects of the language, and even goes as far to show us how he used it to create a desktop calculator. The problem that I would find with learning C++ is that you need to run it through a compiler, which is basically a program that allows the computer to read the code. It isn't like HTML, or even Javascript, where you write your code and then run it through Firefox to see if it works.

Still, even after all these years, C++ is still a very popular, and widely used, computer language. In fact quite a lot of games (including the Fallout series) were written using this language. It certainly is one of those languages that any computer programmer worth his salt should know, it is just that it is probably better to learn it another way than to grab a copy of this book.
Profile Image for Uli Kunkel.
22 reviews6 followers
October 17, 2019
Book's first part is fantastic. I can't highly recommend it to a professional software deveolper who watns to RASIE it to a HIGHER standard. The SECOND part was more difficult to digest. Anyway, I didn't regret it.
Profile Image for Amol Gawai.
8 reviews6 followers
March 23, 2012
This shall not be your first book on C++. It is a heavy book and explains many design decisions for the language. If you want to master C++, this is a must read.
Profile Image for Adam.
39 reviews6 followers
October 11, 2010
This book was a beast. I tried to read it front-to-back, and it ended up taking me over a year to do it (including lots of downtime and time off due to information overload). So I wouldn't recommend that. I suggest reading the first chapters in order and then hitting the rest of them piecemeal as you run into something relevant in your life.

That said, this book was incredible. I don't know why this wasn't required reading as part of my college education. All the rest of my textbooks should have been thrown out and replaced with this one instead. Bjarne's examples were that rare combination of both clear and informative, and his prose was the same.

Reading this, I kept asking myself why the hell my textbooks had been so complicated. I used to assume it was because they were tackling a complex topic and trying to do a complete job of it, but now I see that they were just poorly written. They made programming seem very complicated and very dense. This book did the opposite. It was great.
Profile Image for TC.
7 reviews13 followers
December 27, 2010
This book is considered to be the ultimate C++ bible as it's written by the creator of C++ himself, Bjarne Stroustrup, although I much prefer Big C++ as a reference book. This book is also clearly written by a straight programmer who isn't great when it comes to documentation as many of his explanations of the language are long-winded and overcomplicated for no reason.

It is worth noting that if you're looking for a book that serves as an introduction to the language, stay well clear from this and take a look at 'Developing C++ Software' by Russel Winder, a lecturer at University College London who wanted a textbook for his first year Computer Science students to accompany the department's programming course.
Profile Image for Shortempered.
3 reviews2 followers
September 23, 2008
not a book for a beginner, read it if you already know what you are reading..
the best..Author is my personalized GOD !

Well, I stick to my review more firmly now that I have almost completed (only once) this super-genius work.
To be more specific about the book:

The book is source of almost everything you might want to know about the C++ or probably insight of everything to what one programming language has to offer. Although book is comprehensive, it is not a book made for you, if you are just starting with the whole idea of programming. This book surely needs a sound background in programming ( at least the conceptual side) and also needs a curious attitude of finding out the information which might not be directly useful but gives you a tequila-kick when u read. Exception handling and few other chapters are ultra-handle-with-care ones so spend more time on it , again it might not be so useful to you directly but knowing doesn't hurt in any case.

Once again, if this is your first book of object oriented Programming, better get a copy of any "C++ Primer" or any of your choice ( I just recommended that one as I have read many outstanding reviews about that one, but its ur call ).

Its confusing for you to interpret if I am actually recommending this book or the other ones by writing this review, but my whole point is to bring out the fact that if you read this book directly, you sure are going to understand most of the things but You will take many things for granted which are of great importance+must know and worth "time spent on" .

must read !
299 reviews8 followers
January 23, 2008
One of the lessons that has stuck with me from Strunk and White's Elements of Style is Rule #17: Omit Needless Words.

Bjarne Stroustup does not.

Consequently, it makes a challenging task -- trying to learn and understand the complexities and nuances of C++ -- even harder. If you're writing C++, this book probably belongs on your shelf. But you should learn from and refer to better books.
Profile Image for Sandra.
298 reviews58 followers
December 13, 2018
The best C++ reference, as always.
Not a fan of the way in whichever the language is being reshaped.
Profile Image for Tony.
102 reviews
February 19, 2013
This book is the reference on this programming language. It attempts to follow in the footsteps of "The C Programming Language," which was thin but useful and more than a little amusing.

It succeeds in being a useful reference to this heavily-used language. The author, though, doesn't have the wit of the earlier authors and some attempts seem forced. Also, this is a much larger language. Part of why the earlier book was so thin was that the language itself was rather small and depended on libraries to implement a lot of the more complex functionality. This language has a lot more built in and THEN you have some pretty significant libraries on top of that.

Probably not a good idea to attempt reading this cover-to-cover but, if you develop in this language, this is THE reference to have on your desk.
5 reviews1 follower
June 20, 2007
This is the authoritative reference on the C++ programming language. This book works best as a reference. Do not try to learn the C++ language from this book; its dense reference-filled text is too difficult to decipher for the beginner. However, I have found it to be very useful as a reference. For example, while designing and programming a set of complex generic templates, this book helped me untangle a series of mysterious compiler errors.
Profile Image for Morris.
41 reviews1 follower
June 18, 2008
A colleague was quite scornful when I revealed I did not own the 3rd edition of this book. The first two editions are wonderful guides to the language. This edition mostly adds pages of Stroustrup's opinions as to what constitutes good programming practices. Though they are obviously of interest, I find that they are often too general to be useful and occasionally are self-contradictory.
Profile Image for Michael.
33 reviews10 followers
September 7, 2008
This book has the basics of C++ at the beginning, though it may not be the best book to read if you are a novice programmer. There are many insights into advanced concepts in C++ (e.g. this has the best section on how to use templates and the STL algorithms that I've seen in print). A great reference for professionals to have on their shelf.
208 reviews46 followers
June 17, 2009
Do not try to learn C++ from this book. But get a copy and read it through when you have the basics down. Valuable advice is hidden throughout the book.
Profile Image for Mihail Feraru.
20 reviews4 followers
Read
October 22, 2020
Skimmed through it. I would rather recommend online cpp reference or other books for educational purposes.

Should re-read later.
Profile Image for Brian Salehi.
48 reviews9 followers
October 13, 2019
Interestingly covered everything in too much details.
If you're a newcomer to the C++ language, runaway from this book!
I strongly suggest "Sams Teach Yourself C++" book for newbies.
If you're an experienced C++ programmer, then here you go! this book is for you.
by the way, DO NOT use this book as a learning tutorial, consider it as a reference which you can refer to whenever you need to get into the details of a topic.
In the way of using this book as a tutorial, the problem arises when you face a topic which uses future discussed details as current explanation which makes any newcomer confused.
you really need to be confident about C++ already to get it right.
Use it only when you need to get into deep details of a specific topic.
Profile Image for Charles H.
10 reviews1 follower
January 28, 2008
This is the definitive book on the C++ programming language written by the man Bjarne Stroustrup himself. While those who are unfamiliar with C++ should avoid it, experienced C++ programmers will find that it can perfect their abilities. Nearly every intricacy and trick of the language is discussed. In fact, the only thing I've been unable to find is whether or not friendships inherit between classes - a rather obscure piece of C++ lore (they don't).
35 reviews4 followers
September 26, 2007
Revisiting some of the newer stuff in C++ since I've been away a few years doing mostly Java. I was hesitant to get this book because it I thought it would be more of a reference like his earlier books and he is the inventor of the language. To my surprise, this is a very well rounded book. Highly recommended.
903 reviews3 followers
July 29, 2018
I read the first edition of this book many years ago and generally hated it. This month, I read the "Special Edition" hoping that Stroustrup had improved the book, but alas, I was disappointed once again. In general, I find that very talented computer scientists are very poor authors, and Stroustrup is no exception.
Profile Image for Steven.
AuthorÌý1 book63 followers
July 21, 2015
The original and best book that covers the design and syntax of the C++ programming language - still the language for 'real' programmers, who like their programs to be hard to write and harder to understand.
Profile Image for Steve Rainwater.
221 reviews16 followers
January 3, 2021
1 - Review of The C++ Programming Language
1.1 - Introduction
This review is about the book, The C++ Programming Language
1.1.1 - Paradigm
The paradigm used to review the book will be to write in the overly verbose, information-sparse format of the book itself.
1.1.2 - Format
The format of this review will be to provide an introduction, expanded by sub-sections on the paradigm, format, scope, structure, and other aspects of the review. After that the review itself will be presented. Lastly, a summation will be provided.
1.1.3 - Scope
The scope of this review primarily covers the book The C++ Programming Language but may refer to other books that represent canonical descriptions of specific programming languages, usually for the purpose of comparison.
1.1.4 - Structure
This review is structured such that there are lots of sections, sub-sections, and sub-sub-sections that offer many opportunities to be verbose while simultaneously obsfucating the important points and annoying the reader. Note: at times it will also be necessary to use sub-sub-sub-sections and the reader will hopefully understand the necessity for these as they arise.
1.1.5 - Exercises
Unlike the book, this review includes no exercises for the reader since these will be ignored anyway and are not generally useful.
1.1.6 - Aims and Means
The goal of writing a review in this annoying form is to give the reader a taste for what it's like to read this annoying book in all its Dilberesque, corporate-speak glory.
1.1.7 - Historical Note
It is acknowledged by the author of this review that writing a review in this way is unusual but this book's format and style was found to be particularly annoying.
1.1.8 - Philosophical Note
These headings were not invented for this review. They can all be found in the book itself.

1.2 - The Review
1.2.1 - Scope
This section will contain the most important points of the review
1.2.2 - Format
This section will not include sub-sections such as Paradigm or Historical Notes that were included in other sections of this review as they have been determined not to be as useful in this section of the review.
1.2.3 - Structure
This section of the review will contain the review but not things unrelated to the review such introductions to the review or summations of the review
1.2.3.a - Location of topics not within scope of this section
1.2.3.a1 - The Introduction can be found prior to (1.2) The Review in section (1.1)
1.2.3.a2 - The Summation can be found after (1.2) The Review in section (1.3)
1.2.4 - Length of Subsequent Sub-Section
The subsequent sub-section is longer than others due to additional content needed to inform the reader. There was debate about breaking it into a series of sub-sections but it was determined this was not the best approach (and it was also determined it was important to explain this rationale to the reader who may have run into similar dilemmas in writing their own reviews).
1.2.5 The Content of the Review
There have been many definitive books written about programming languages by their respective creators. These books tend to be concise, useful, readable, and even enjoyable books that often become classic volumes of computer science history. Books such as The C Programming Language by Kernighan and Ritchie or Programming in Modula-2 by Nilaus Wirth come to mind as typical examples. The C++ Programming Language is not one of these. The book is overly verbose, redundant, and often not even very clear about what it's trying to get across. Another C++ book will likely be needed to fully grasp the language. It's also a long, slow slog to make it through this book, even if the reader has a general interest in programming and programming languages.
1.2.6 Recommendation
Not Recommended.
1.2.6.a - Explorations of the Recommendation
1.2.6.a1 - Anyone looking for an enjoyable read or hoping to learn C++ should avoid this book
1.2.6.a2 - C++ programmers who feel the need to posses the language designer's official description of the language as a reference might want to get this book.
1.2.6.a2-ii - But attempting to read it linearly is not recommended, instead use it simply as a reference guide in which to look up topics when needed.

1.3 - Summation
1.3.1 - Scope
The scope of the summation includes reminding the reader of what has been said and re-enforcing certain points considered important to grasping these points.
1.3.2 - Style
This review has been presented in a format consisting of an Introduction (1.1), followed by further comments in The Review (1.2) and, finally, summarized in a Summation (1.3).
1.3.3 - Rules of Thumbs
A programmer should be careful is learning and using a programming language created by someone who is not able to describe the language clearly and concisely but there are, of course, exceptions to the rule so don't attempt to apply it arbitrarily to any language in particular, even this one.
1.3.4 - Caveat
While the book was quite a slog, there may be a redeeming quality such as humor at having survived the experience. Arguments for and against this line of thought exist. Consider your application carefully before adopting this approach.
Profile Image for Thomas 'afin'.
12 reviews
October 2, 2007
It helped me much to passed the Object-Oriented subject for the second time.
Because of this book, object-oriented becomes my subject :)
13 reviews2 followers
February 28, 2008
This book is not a good read but very useful when looking for specifics in syntax or methodology. A great technical reference (especially for compiler design) but not a good tutorial by any stretch.
Profile Image for Jeff.
48 reviews2 followers
June 16, 2008
Required reading and reference for every C++ developer
Displaying 1 - 30 of 105 reviews

Can't find what you're looking for?

Get help and learn more about the design.