update example.cpp