Begin C++ implementation.