thinking_in_c++'s exercise