C++ basic implementation.