translating to c++