cpplearning:add chapter7 code