HACKER Q&A
📣 HerrmannM

Ressources to update old C++ skills


Hi All!

I used to do some C++ 10 years ago. I now have to work on some new projects that will require C++. I know that C++ evolved a lot. Without being after all the new features, I'm looking to write safer code (eg through safer pointer handling).

Do you know about some ressources focusing on how to code in C++ in a "modern" and safe way for people with previous experience in the language? For example, after some search, I have "Effective Modern C++" in mind (focusing on c++11/14), but I would love to hear what the HN community has to say before jumping in!

Note: As much as I appreciate other safer languages, C++ is a requirement so I'm really looking for safety in C++.

Thanks!


  👤 pnako Accepted Answer ✓
'A tour of C++' by Stroustrup is a good overview of modern C++.

I recently got back into C++ after big hiatus, just like you, and for me the things that changed are:

  - definitely the things you mentioned: much safer constructs (unique_ptr, move semantics)
  - the use of CMake as a build system
  - much less focus on arcane templates and libraries like Boost
  - new tools like sanitizers
  - new IDEs (CLion)

👤 SamReidHughes
If you already know C++03, I'd first take a look at the C++11 Wikipedia page. (It might be less bloated if you go back in the page history, so try going back to 2012.) I don't think guides or resources beyond that are really necessary to grasp what's new and how to make use of it, except for precise reference documentation.