That book's example looks more C than C++, not the best way to teach C++ for a beginner IMO. Especially if it is the 2nd edition published in 2019.
Yow, the price at Amazon is a bit steep! Used, new or eBook.
https://www.amazon.com/C-Crash-Course-Josh-Lospinoso/dp/1593278888/
There is an online free tutorial website for learning C++, Learn C++:
https://www.learncpp.com/
The lessons are more aligned with the C++ Core Guidelines in how C++ is presented:
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
Amazon's webpage on the book has this to say:
Who Should Read This Book
This book is intended for intermediate to advanced programmers already familiar with basic programming concepts. If you don’t specifically have system programming experience, that’s okay. Experienced application programmers are welcome. |
That kinda rules out this is a book for beginners.
Using just one book to learn C++ is not a good idea, the language is so huge a single book can't do justice to the language.
Books are outdated even the day they are published, C++ introduced C++20 shortly after this book was published, and C++23 is in the final stages of being approved.
There is a website,
https://leanpub.com/, that sells eBooks as the authors are writing the book, at a price to reflect how complete the book is. And even when the book is finished if the author updates the material the updates are free. I've purchased several books from the company and nearly every book there's at least one update free of charge. A couple more than one.
I am a self-taught programming hobbyist, been doing it since the mid-1990's. Before the internet and online resources.
My programming library is several dozen books/eBooks, from C/C++ to WinAPI to game programming, etc.
This is one expensive hobby. :)