Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to write C++ extensively between 8 and 10 years ago. I have since moved on to C# for professional reasons. However, from time to time I see statements like

"If you're still manually tracking pointer references, you're doing it wrong"


"C++ is perfectly safe as long as you're using modern concepts like RAII and not manually allocating memory like a recovering C developer."

Both of those were standard procedure a decade ago. I have seen that C++ has been improved considerably in recent times; C++ 0x in particular seems like it has some new capabilities. What's the best resource for a "C/old C++" programmer to get caught up on "modern" C++ patterns and practices?

share|improve this question

closed as off-topic by gnat, MichaelT, Kilian Foth, Bart van Ingen Schenau, GlenH7 Mar 9 '15 at 14:09

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, Community, Kilian Foth, Bart van Ingen Schenau, GlenH7
If this question can be reworded to fit the rules in the help center, please edit the question.

They were standard procedure a decade ago. Unfortunately, there is still a very significant portion of C++ devs using the standard procedure from three decades ago. – DeadMG May 9 '12 at 19:25
I don't know of a single resource, but modern C++ basically comes down to: (1) extensive use of the STL whenever possible instead of hand-rolled algorithms, (2) usage of smart pointers and STL containers over manual allocation/deallocation, (3) a functional-esque programming style using functors/lambdas along with higher-order functions, and (4) a preference for template-based static polymorphism over runtime virtual functions whenever feasible – Charles Salvia May 9 '12 at 20:30
Effective C++ by Scott Meyers – Gary Buyn May 9 '12 at 22:40

It may have more to do with the instructional materials than most other things, but 8-10 years ago it seems to me that the way the language was used differed a great deal to today. The focus today is more on leveraging templates, type safety, and generic programming where before there was more fear of all that and people focused almost exclusively on the C with objects aspects.

Instructional materials are changing too. While before the standard C++ beginning book would take you through printf, scanf, hardly even see these in books with a modern approach.

Some good books are any of the red books. Exceptional C++, More Exceptional C++, C++ Template Metaprogramming, Modern C++ Design, Accelerated C++...

I think looking at where I currently work may be a good example. I came here using C++ in a modern way and it seems that most developers don't even know what I'm doing or why. Making objects with operator () in them for example... Had to comment the hell out of every occurence of bind() and eventually was told to scrap all that code. The don't know what initializers do... It's been really freaky and hard for me actually.

share|improve this answer

To get a quick oversight of modern features presented quite well, you'd not go wrong viewing Herb Sutter's recent presentation, "Writing modern C++ code: how C++ has evolved over the years" of C++ features at //build/.

He talks about why its a better language than C# (of course - Microsoft changes its trousers regularly, and today they're wearing the C++ fashion so they will hype this up, just lke they hyped up C# as the answer to world hunger a decade ago) but in doing so he does describe all the good bits (like 'automatic' memory management and the STL classes) and then goes on to talk about the new bits from the C++0x standard.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.