added cpp Chapter 3