Update sample_code.cpp