improve c++ class snippets