Updated C++ snippets