convert to cplusplus begin