addition of c++ example

got it sometimes from Andreas