Updated c++ snippets.