Modern C++ For Absolute Beginners, Book Review
In January, I was lucky to get a relatively new book on Modern C++! This time it’s not aimed at experts but rather at the beginner level. It’s called “Modern C++ for Absolute Beginners,” written by Slobodan Dmitrović. I think it might be a valuable resource for job interviews.
Let’s see what’s inside.
Disclaimer: I got a free copy from the author.
The book on Amazon:
Modern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards 1st ed. Edition @Amazon (released in July 2020).
The book page at APress:
Modern C++ for Absolute Beginners
Github repository with all samples:
Slobodan is a software development consultant, C, and C++ trainer, and author of two programming books. He specializes in training, research and development, and consulting. Slobodan has been working as a professional software developer for more than twenty years. Since 2019 he has been dedicated to providing training and consulting services, speaking at conferences, and writing programming books. Slobodan provides C and C++ training services to corporate clients through his company: C++ and Friends.
You can also hear an episode of C++Cast with Slobodan where he talks about his other book for C: Jan 6, 2022 - Modern C for Absolute Beginners @C++Cast.
Let’s see what’s inside the book.
We have 40 small chapters in total:
- What is C++?
- C++ Compilers
- Our First Program
- Standard Input
- Introduction to Strings
- Automatic Type Deduction
- Scope and Lifetime
- Classes - Introduction
- Classes – Inheritance and Polymorphism
- The static Specifier
- Organizing code
- Smart Pointers
- Input/Output Streams
- C++ Standard Library and Friends
- C++ Standards
While the number of chapters is impressive, the whole book is only 300 pages in length, giving us only 7,5 pages per chapter. And some of them are only two or four pages.
Still, it’s essential to keep in mind that that was the whole point of the book, to keep it short and provide a valuable introduction to Modern C++.
As you can see from the list, we start from something straightforward - like creating a hello world example to more advanced topics. After a chapter or two, there’s an “exercise” section where you can see questions about the topics from the previous parts.
“Modern C++ …” is a relatively short book, however thanks to many valuable examples and a gradual increase in complexity, it delivers its goals.
When I got this book, I immediately thought it could be a valuable resource for job interviews. Rather than going through tons of pages from various books, you can just use this book and prepare for the core topics from C++. While it won’t give you enough material for a senior position in C++, it will prepare you for junior/mid jobs or in a situation where C++ is not the dominant language in that position.
During the reading, I sometimes noticed the lack of some important topics like the Rule of Zero, explicit constructors, or some more advanced examples of templates. Still, that’s an unfair view of someone who uses C++ a lot, and won’t be a problem for someone who just started with C++. Maybe it’s even better, as there’s smaller “information overload”.
I like that Slobodan selected a good range of topics to cover. As an example, let’s take the Smart Pointers chapter. To keep it short, he focused on unique_ptr and shared_ptr, but left weak_ptr. This is the right choice, as weak_ptr is probably not something you need to know when starting your C++ journey. Slobodan also points out why using raw pointers is not the best approach and alternatives Modern C++ offers.
In summary, I like the book, and I can recommend it to anyone looking for reliable and easy-to-read materials.
Final mark: 4/5
- Concise - the book delivers its promises and goals
- Lots of examples
- Gradual increase of the complexity, so you go from simple topics to more advanced.
- The last chapter is a cool overview of the latest C++ Standards
- Well written and precise
- Some chapters are really short, like 2 pages only - some more description, more examples would be helpful there to “fill the gap”
- Some topics were left out (like explicit ctors, rule of zero) - but maybe that’s not aimed at the beginner level, so that’s not a strong point.
I've prepared a valuable bonus if you're interested in Modern C++!
Learn all major features of recent C++ Standards!
Check it out here: