fixed up examples for C++