c++ code

added initial c++ code from the tutorial