Update chapter1.cpp