Converting to C++