more cpp snippets