changed c++ example