update cpp methods example