add chapter03 cpp code
improve chapter 3 code readability
Merge pull request #64 from Boshen/master

add chapter 3 cpp code and improve code readability