Create code.sample.cpp

C++ code sample.