Added comments for sample c++ code