add and improve C++ snippets