HACKER Q&A
📣 mr_o47

Best way to learn C++ in 2022


Hello HN,

What are good books, tutorials and courses which can allow you to become better C++ programmer if you are starting as beginner


  👤 stefanos82 Accepted Answer ✓
I will copy my answer from a previous "Ask HN" that asked a similar question.

  > https://cppbyexample.com/
  >
  > https://hackingcpp.com/
  >
  > https://www.learncpp.com/
  >
  > https://github.com/AnthonyCalandra/modern-cpp-features
  >
  > https://cppinsights.io/ it's a must so you can investigate what gets generated by templates behind the scenes.
  > http://eel.is/c++draft/ bookmark this, you will need it!
Now, about books I would suggest the latest "A tour of C++" by Bjarne Stroustrup; it's ideal for experienced programmers that want to learn modern C++ rather fast.

Other books would be Scott Meyers' Effective Series, Andrei Alexandrescu and Herb Sutter are a must, and of course Jason Turner's "C++ Weekly" series [1]; of course apart from the books, the links I have originally shared are more than enough to cover everything around C++.

[1] https://www.youtube.com/c/lefticus1/videos


👤 Bambo
A good way to learn more is to search for books about topics you're interested in e.g.; sqlite, zeromq, google testing libraries, opengl...

1. https://www.amazon.co.uk/Design-Patterns-Object-Oriented-Add...

2. https://www.oreilly.com/library/view/using-sqlite/9781449394...

3. https://www.glprogramming.com/red/

4. https://gameprogrammingpatterns.com/

5. https://zguide.zeromq.org/


👤 transfire
If you are starting as a beginner then I recommend that you simple “Don’t”. C++ is a rather terrible and (slowly) dying language. I have to use it at work with Qt and would rather be coding in just about anything else (including Forth!)

If you want to learn low level coding, Rust is probably your best option.

If you want move up a level and don't need to be right against the metal, Crystal is probably the best OOP choice.

Beyond that, if you don’t need your code to be near C speeds (most applications do not), there are a number of good choices that will make you far more productive — Elixir, Ruby, Clojure, Pharo, Julia, etc.


👤 iExploder
The C++ Programming Language from Stroustrup is the c++ bible but Im not sure all of what you find there is actually useful for day to day coding.

To become a better C++ programmer you just use the language, but not on a project where you fix bugs, but on a project you write from start to finish. If this is not possible at work, you could try looking into contributing to open source c++ projects on github...

When using C++ in practice to build projects you realize what features are actually useful, what to avoid and what the limitations of the language are. C++ does have a lot of after thought add-ons...