Added some C++ snippets

Change-Id: Id4b1533e3921a1fb0cecdd6575f4f9ab374f4a04