Update example6.cpp