rename to cpp
fix warnings and build with minor c++ifcation
rename to cpp
more constness and fix build after rename