More snippets in for class functions in cpp