Sams Teach Yourself C++ in 21 Days,3rd edition is a hands-on guide to learning object-oriented programming, design and analysis. Readers will gain a thorough understanding of all basic concepts, including memory management, program flow, compiling, and debugging in 21 days. Readers will learn through enhanced examples how to write fast, powerful programs, compile the source code, and create executable files. Sams Teach Yourself C++ in 21 Days,3rd edition has been updated to be compliant with the finalized ANSI/ISO C++ Standard, and includes additional bonus days on namespaces, the Standard Template Library and distributed computing. We've included a glossary of terms and clarified of some of the examples found in the advanced topics chapters, per readers' suggestions.
Jesse Liberty has three decades of experience writing and delivering software projects and is the author of 2 dozen books and a couple dozen Pluralsight & LinkedIn Learning courses.
He currently works for CNH writing APIs. He was a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS.
He has been a Microsoft MVP for 13 years.
His most recent book is Writing APIs with .NET (Packt 2024)
When I started learning C++, this book was my guide...I have read it at least 5 times, and never get bored of it...Wish more Programming writers could write half as good as Jesse Liberty.
I have read this book twice. Once in Chinese and once in English. It is the very foundation of my C++. I feel it is better suited as a entry book than C++ Primer.
Back in my university days (2006-2011) at TalTech, in the first semester of my Computer Science study, this was the first book that really made it "click" for me. I read it in Russian translation and for me at that time it was a real eye opener.
I am really grateful to this book and of course to its author Jesse Liberty for all the knowledge I gained from reading it.
As of today (2025), of course lots of new stuff was added to C++ (and not everybody are exited about that), but IMHO this book still should be good at teaching the basics of C++ and programming in general, including Object Oriented Programming. It is the old-school C++, the one that is more like "C with classes", that predates the subsequent standardization "roller coaster" etc.
This is an outrageously accessible approach to what can seem an intimidating language.
Interpreted languages have the same basic structure as narrative, so they are relatively straightforward to comprehend GOTO and similar loops notwithstanding. Object Oriented languages like C++, on the other hand, though they can do a fantastic job of modelling and simulation, are somewhat foreign at first ni their approach to the basic components of code. Functions attach explicitly to classes and instances, rather than as qualities of the programming environment. That's not quite naturalistic, and it takes a bit to wrap one's head around where, precisely, to locate routines and variables so that they can be accessible enough for functionality, but not so universal that you're simply throwing everything into an #include file and eating memory.
Sam's guide, like always, comes through. The initial steps are teeny, tiny baby steps, and it is tempting to think that one is going too slowly. But this is an essential coneit of the series, and it's particularly necessary in this case. Think of this book as the prelude to a meatier, application-specific tome.
Since this is just a 21 day intro, don't expect to get into GUI design or pretty graphics libraries. Save that for a later day. But as an intro to the structure of C++ and OOP languages in general, this is highly recommended.
I used to program exclusively in C up until about 16 years ago and had been programming primarily in java for the next few years. At some point I had some open-source C++ code that I needed to extend. The good news is that C++ can almost be considered an intersection between C and java, but it does definitely have its own set of capabilities and quirks that a programmer needs to understand. The book presents the material fairly clearly and, for the most part, is well organized. And it did teach me what I needed to know in order to be successful with my little work project (that was several years ago). In subsequent years, I had to do a fair amount of C# programming and liked that language more than C++.
I'm actually really enjoying the tone with which theory is introduced– e.g. the very simple explanation of interpreted vs. compiled languages, the point of event-driven paradigms, etc.
I wasn't planning to actually learn C++, but this book is applicable across the board for my programming exploits.
The exercises are good, the writing clear throughout, and many important concepts are introduced. The author is pretty clearly biased toward C++ above other languages, but he knows it and makes it clear when he's telling you opinions.
I'll never forget, after having checked this book out of my local library for the better part of two summer vacations, reading through the linked list sample code and understanding what was going on!
In hindsight, this book probably does not teach the best practices, and I would not recommend it as an introductory read on C++. However, everything I learnt externally was either on forums, from articles, or in class, so I can't really recommend a substitute. That said, Google. Online communities are your best bet for starting with any new language.
This was the book I first used to learn C++ 15 or so years ago - my copy is literally falling apart due to the number of times I've read and reread it. Fantastic book - as mentioned, definitely more useful as an intro than a comprehensive C++ reference, but it covers all the major topics and does a great job explaining more OOP areas.