Transplant to C++