translate from C to C++