Getting the camera to follow something. Probably quite easy

How could I use the ofCamera class to follow a moving 3d cube. The cube can move vertically and horizontally and would like the cube to be viewed from ‘behind’ . Example code would be great?