cpp api doc fixes

A couple small fixes to the cpp docs and example