update print CPP methods example