Chapter 3 for C++