added a C++ example