exercises from c++ primer book