Chapter 4 for C++