converting to c++