some c++ sample codes