Fix C++ snippets