Jump to ratings and reviews
Rate this book

C++ Primer

Rate this book
" C++ Primer is well known as one of the best books for learning C++ and is useful for C++ programmers of all skill levels. This Fourth Edition not only keeps this tradition alive, it actually improves on it."
--Steve Vinoski, Chief Engineer, Product Innovation, IONA Technologies " The Primer really brings this large and complex language down to size."
--Justin Shaw, Senior Member of Technical Staff, Electronic Programs Division, The Aerospace Corporation "It not only gets novices up and running early, but gets them to do so using good programming practices."
--Nevin ":-)" Liber, Senior Principal Engineer (C++ developer since 1988) This popular tutorial introduction to standard C++ has been completely updated, reorganized, and rewritten to help programmers learn the language faster and use it in a more modern, effective way. Just as C++ has evolved since the last edition, so has the authors' approach to teaching it. They now introduce the C++ standard library from the beginning, giving readers the means to write useful programs without first having to master every language detail. Highlighting today's best practices, they show how to write programs that are safe, can be built quickly, and yet offer outstanding performance. Examples that take advantage of the library, and explain the features of C++, also show how to make the best use of the language. As in its previous editions, the book's authoritative discussion of fundamental C++ concepts and techniques makes it a valuable resource even for more experienced programmers. Program Faster and More Effectively with This Rewritten Classic The source code for the book's extended examples is available on the Web at the address below. www.awprofessional.com/cpp_primer

885 pages, Paperback

First published January 1, 1989

Loading interface...
Loading interface...

About the author

Stanley B. Lippman

17 books15 followers

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
458 (47%)
4 stars
302 (31%)
3 stars
149 (15%)
2 stars
37 (3%)
1 star
9 (<1%)
Displaying 1 - 30 of 46 reviews
Profile Image for Vladimir.
49 reviews18 followers
February 12, 2011
A really good C++ book for beginners. I mean, it probably won't work as the very first book on programming, but if you have some programming background and just want to learn C++, this should work really well. The whole thing is structured very nicely, and in the rare case when you have some questions, they are typically answered on the next page.

I realized that nobody ever taught me C++ properly, so I decided to try reading a few classic textbooks, starting with the very basics - this one. It felt funny: I was like "Meh, I know 85% of this stuff" all the way, but now these 85% are much better structured in my head - and the remaining 15% turned out pretty useful. Anyways, moving on to the more interesting stuff.
Also, that's the longest book I've read since "The Lord of the Rings".
Well, maybe only "War and Peace" and "Tikhy Don" were longer. Let's make it "the longest book I've voluntarily read since LotR".
Profile Image for Heather.
120 reviews10 followers
November 30, 2012

I've been using this book to brush up on my C++ for interviews - I've been writing C++ for a while, but I've also worked in some environments (embedded) where C++ was written more like C (no use of vectors, strings, etc.), so I needed to brush up on these topics the most.

On that account, I think the book is great (I'd even say 4-star worthy).

However....one thing I found slightly disturbing is that the book seems to imply that learning about pointers and memory management are a thing of the past (just use the libraries!) - no need to really cover it in-depth or understand it well either.

All of my jobs have required serious knowledge on these topics and now I am beginning to understand why we would get people in interviews with no real skills in this area - are people really being taught that there's no need for this knowledge anymore? Please - if you have any interest in embedded work - you have to go beyond this book!
Profile Image for Adam Getchell.
38 reviews1 follower
September 11, 2015
This is a fantastic book, and a great learning resource. I initially started with Scott Meyer's "Effective Modern C++: 42 Specific Ways to Improve Your Use of C++11 and C++14", but realized there were too many conceptual gaps I needed to fill. This book was just the ticket. It was about a week-long detour, but essential to further progress. Even though I've "finished" the book, I know I'll go back and refer to sections that I skimmed.
Profile Image for Chip.
10 reviews7 followers
December 29, 2012
The first good C++ intro that fully adopts C++11 style and features. Read it!
Profile Image for Wouter.
Author 2 books24 followers
September 24, 2018
A big help on refreshing my long-gone C++ knowledge that reminded my why it was gone in the first place... This "primer" with 400+ pages sorts out all ambiguities between raw pointers and smart pointers and is loaded with insightful comments, including the new C++11 syntax. Some gripes I had were the weird usage of example code that started from something existing on the web instead of a simple example from zero, and the here and there wrong stresses on certain concepts - but that might have more to do with my preference of clean, readable code that isn't easy with STL's overuse of templates. We are actually encouraging students to learn basic C(++) concepts using this book.
19 reviews1 follower
April 2, 2021
First half is mandatory, second half is useful as a reference.
Can't believe after all this not even one module for my degree uses C++
9 reviews3 followers
April 24, 2015
This book is a good solid introduction to modern C++. It covers a lot of language features and it does so in the right way, i.e. it does not teach you C++ through C as many other books do, but rather introduce the reader directly to modern C++ which is mostly free from its C heritage. The overall structure of the book is quite logical, explanations are thorough and clear, examples are right up to the point.

However, few things should be noted. First, the book is only for those who does have some prior programming experience: it would not teach you programming, it would teach you mostly the language. Secondly, while the book covers a lot of C++11 features I would not recommend it to anyone who is already familiar with C++ and would like just to learn new C++11 features. The reason is that C++11 features are smeared all over the book and explanations while clear are usually also too wordy.
4 reviews
February 23, 2023
If you want to learn more difficult complex C++, pick up this book. It's a book that's been hyped by the masses, and I sincerely hope you don't learn C++ from it.

In this book, the question "Why?" "When?" is always missing in every chapter; this is always a foolishness to learn programming. Also this book is boring and too compressed for beginners to interpret sentences.
Profile Image for Yash E.
42 reviews3 followers
September 3, 2014
Least number of examples and exercises. Better as a reference. Digs deep into the concept.
Profile Image for Harry Harman.
609 reviews13 followers
February 15, 2023
Mosttexts presentC++ intheorderinwhichitevolved. TheyteachtheCsubset of C++ first, and present the more abstract features of C++ as advanced topics at the end of the book. There are two problems with this approach: Readers can get bogged down in the details inherent in low-level programming and give up in frustration. Those who do press on learn bad habits that they must unlearn later.

Throughout C++ Primer, we emphasize good style: We want to help you, the reader, develop good habits immediately and avoid needing to unlearn bad habits as you gain more sophisticated knowledge. We highlight particularly tricky matters and warn about common misconceptions and pitfalls.

cement their grasp of the language.

Source code for the extendedexamplesis availableon the Webatthe following URL: http://www.informit.com/title/0321714113

The compiler we use most frequently is the GNU compiler, version 4.7.0.

return 0;
The only statement in this block is a return, which is a statement that terminates a function.

Most compilers, including those that come with an IDE, provide a commandline interface.

Program files are normally referred to as a source files. On most systems, the name of a source file ends with a suffix, which is a period followed by one or more characters. The suffix tells the system that the file is a C++ program. Different compilers use different suffix conventions; the most common include .cc, .cxx, .cpp, .cp,and.C.

Comments help the human readers of our programs. Theyaretypically used to summarize an algorithm, identify the purpose of a variable, or clarify an otherwise obscure segment of code.

A single-line comment starts with a double slash (//) and ends with a newline.

The other kind of comment uses two delimiters (/* and */) that are inherited from C. Such comments begin with a /* and end with the next */.

We often need to comment out ablock of code during debugging.
17 reviews
June 9, 2020
A great introductory book to C++, teaches the important features of the language and the standard library right away. Given that this edition is two, almost three C++ standards old it still holds remarkably well, partly due to C++14 and C++17 being minor and medium upgrades, as opposed to the major upgrade of C++11, which this book teaches.

Definitely worth the read for anyone wanting to learn C++. This is a great place to start even with modern C++.
Profile Image for Tal Ohana.
1 review
October 17, 2022
After programming in C++ only for educational purposes (e.g. learning about loops, recursion, etc) I decided to revisit the language out of curiosity.

The first half of this book is an extensive introduction to programming in C++. Each section provides a set of problems which really helps nail what was introduced.
The second half is more like a reference with an advanced topics, which personally I only skimmed.

Overall, if you want to learn about C++ this is a book for you.
4 reviews
April 6, 2019
The book is great, except that I never finish it. It's more like a dictionary rather than a introduction for novice even if it attempts to be one, which is worse because the effort to make it more friendly eventually makes it a dictionary without order.
Profile Image for Capauri.
4 reviews
May 2, 2021
The book certainly does not replace the best way of learning programming through doing, but it's an amazingly efficient way to fill in any gaps in beginner/intermediate knowledge. The language is clear, progression of topics is coherent and the questions and exercises included are well adjusted.
1 review
April 15, 2022
The single best book for learning c++ that I have come across, it goes from the very basics to the intermediate without ever feeling like it is talking down to you. Cannot recommend enough if you are thinking about learning c++
Profile Image for Myat Phyo Thu.
6 reviews
July 21, 2017
I learned my C++ 4 years ago from this book together with Stroustrup's "the C++ programming language". And I often come back to some chapters in here when I need reference, like a Bible.
Profile Image for Radhika Shendye.
38 reviews
September 13, 2017
Excellent resource for programmers learning C++. It's very lengthy and assumes the reader has programming background. Worth the time and effort.
1 review
May 31, 2021
this books is helpful, helped me a lot to learn the basics
Profile Image for Ben Morgan.
2 reviews
April 17, 2022
Very thorough but a little too wordy for experienced programmers.
Not good as a reference, which is a shame.
Profile Image for Hannah.
36 reviews2 followers
June 27, 2017
A must-read for those who want to learn C++ systematically.
Profile Image for Luis BG.
9 reviews
February 20, 2017
Extensive but well structured to pick-and-chose which areas to dive deep into.
Displaying 1 - 30 of 46 reviews

Can't find what you're looking for?

Get help and learn more about the design.