my simple answers to some c++ problems