C++11 Features

31 Aug 2015

“C++11 feels like a new language.” - Bjarne Stroustrup

C++11 provide many useful features to boost programmers’ productivity dramatically. Below I listed some ‘must-know’ features:

// C++98
for( vector<int>::iterator i = v.begin(); i != v.end(); ++i ) {
    total += *i;
// C++11
for( auto d : v ) {
    total += d;

C++03 to me is not like an improved C, but a more complex C, which makes writing C++ more error-prone and more complicated. But with the new features introduced in C++11, it is indeed more like a new language, which makes me start to like writing C++11 programs.