add sample code while reading c++ primer