Added C++ sample code.