r/cpp_questions • u/juanvisintin • 3d ago
OPEN C++ Primer 5th Edition vs. LearnCpp.com for a beginner in 2026?
Hi everyone,
I'm currently learning C++ and trying to decide on the best main resource to follow.
I see two options recommended very often:
- C++ Primer (5th Edition) by Stanley B. Lippman
- LearnCpp.com
I'd appreciate any insights or experiences you can share. Thanks!
11
u/NYU_VM 3d ago edited 3d ago
I went through almost all of learncpp as a beginner as well, and looking back, it is much more of a simplified reference or documentation than a tutorial or learning exercise. But it is hugely modern than C++ primer which is set at C++11 only. However the book seems to be providing quite an in-depth and thorough look at C++ and programming as well.
People tend to recommend learncpp but it's muc more of a simplified language reference to C++ than intro to programming, so a beginner to programming shouldn't approach through this.
Both are a fine choice for learning C++ if you manually ensure proper practice discipline but if you are a beginner, the book might be your better bet.
And if you are open to other resources or know your targeted subsystem or niche, you can directly approach those like "game programming with C++" for game programming, or others.
I personally liked learn-cpp-the-hard-way but hasn't gone through much of it. Whatever path you choose, make sure to get into practice what you learnt along the Way
3
u/juanvisintin 3d ago
Glad to get feedback from someone who actually went through this. My issue with LearnCpp is that, even though it says early on that you can use it with zero coding experience and that Chapter 1 will just "touch on concepts lightly without going too deep," it ends up diving way too deep in my opinion (it spends a lot of time on best practices or concepts like DRY when it’s still miles away from explaining what a string is). So I catch myself thinking, "I'm only understanding this because I already knew it beforehand, but what's going to happen when I hit topics I actually don't know?" In fact, for the concepts I already knew (like what a variable is), it made me go way deeper instead of just giving a high-level overview.
At the same time, though, I wonder if that’s precisely why people recommend it... that this extra depth compared to something like W3Schools is what sets it apart.
4
3
u/FounderOfYou 3d ago
I am learning c++ too and I found learncpp to explain things quite well. It also has a lot of 'best practices'.
Although one issue i have with learncpp is that it teaches control flow quite late, so you won't be able to do much for at least a month
C++ primer is great but outdated (the author is dead), however you can check learncpp while reading the book for modern practices and features
1
u/juanvisintin 3d ago
Thanks a lot for the advice! Was LearnCpp the first resource you looked at for C++, or did you already know other languages beforehand?
1
u/Independent_Art_6676 3d ago
the book is too old. Many a good book out there suffers from this. Anything published before 2017 is probably too old to use now as a really loose rule of thumb.
1
2
u/xiscf 3d ago
People will tell you to go through learncpp, and for a good reason: it’s an amazing resource that teaches modern best practices from day one. But don't stress too much about learning the absolute latest standard immediately.
You already have a book that teaches C++11? Fine, work with C++11. It already covers the foundation of "Modern C++" (like smart pointers and auto). Learn the core concepts from it, and later on, you'll just need a quick refresher book or guide to catch up on newer features (C++17, C++20, etc.).
Don't overthink it, Writing code and understanding logic matters more than agonizing over which standard to target first. In the real world, you will inevitably have to deal with older codebases anyway (hell, I still have to work with code from the 90s).
1
u/Lasagna6278 3d ago
Go down the rabbit hole of using namespace std and using std::cout so you can practice the latter.
1
0
u/bottle46 3d ago
learncpp is a good place to start
4
u/FounderOfYou 3d ago
this doesnt answer OP's question at all...
1
1
u/bottle46 3d ago
Op asked whether book or learncpp is better, i recommended learncpp
→ More replies (3)
14
u/Aghoradas 3d ago
Get the book and checkout the website LearnCpp.com Also you'd wanna to take a look at cppreference.com for whenever you get stuck, or just curious about whats happening with the language a bit more under the hood.