add c++ support
updates to the c++ version
more c++ work