c++ sample codes