C++ snippets