Alex's exercises

Submit my version of Exercise 2.42 of Cpp Primer