Bestselling Programming Tutorial and Reference Completely Rewritten for the New C++11 StandardFully updated and recast for the newly released C++11 standard, this authoritative and comprehensive introduction to C++ will help you to learn the language fast, and to use it in modern, highly effective ways. Highlighting today's best practices, the authors show how to use both the core language and its standard library to write efficient, readable, and powerful code.
"C++ Primer, Fifth Edition, "introduces the C++ standard library from the outset, drawing on its common functions and facilities to help you write useful programs without first having to master every language detail. The book's many examples have been revised to use the new language features and demonstrate how to make the best use of them. This book is a proven tutorial for those new to C++, an authoritative discussion of core C++ concepts and techniques, and a valuable resource for experienced programmers, especially those eager to see C++11 enhancements illuminated.
Start Fast and Achieve More Learn how to use the new C++11 language features and the standard library to build robust programs quickly, and get comfortable with high-level programmingLearn through examples that illuminate today's best coding styles and program design techniquesUnderstand the "rationale behind the rules" why C++11 works as it doesUse the extensive crossreferences to help you connect related concepts and insightsBenefit from up-to-date learning aids and exercises that emphasize key points, help you to avoid pitfalls, promote good practices, and reinforce what you've learned
Access the source code for the extended examples from informit.com/title/0321714113
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.
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++
Too simple for its own good. Lacks any depth of discussion on the topic of actually coding projects, effectively using OOP, using build tools, and all other presented features; A lot of which are even too obscure or useless in any practical capacity.
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.