adding c++ solution to second problem