Hacker News new | ask | show | jobs
by Veratyr 3214 days ago
As a newcomer to C++ myself, I found Stanley Lippman's C++ primer to be helpful. The latest edition includes the newer features.

And in case it helps, the main things I find myself using differently to C are:

- Smart pointers. If you're not using them, use them. They're amazing. Seriously. Never have to worry about freeing something ever again.

- Object oriented design.

- Const reference arguments.

- The occasional auto.

2 comments

I'd second C++ Primer. It's a great overview of the language and has been updated for C++11. Unfortunately it was written too early for C++14 and beyond so if there is a newer edition planned (I've no idea) it might be worth the waiting. In any case C++11 was the big change for C++ so the fifth edition is still worth while.

One word of warning though, there's a confusing similarly titled book called "C++ Primer Plus" which you should avoid at all costs.

I'd add RAII to this list. Also, I find simple template functions to work as an incredibly powerful macro system.