cpp finish chapter 8: adventures in functions