minor fixes for c++ snippets