cpp example code