Chapter2:definitions

included code for the second chapter. Build the two cpp files together.