Bugfixed cpp_demo.cpp for compliant C++11 compilers