" 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
general: 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.
personal: 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".
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!
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.
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.
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.
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.
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.
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.
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++.
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.
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.
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.
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++
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.