Updated cpp snippets