Updated cpp snippets.