Added C++ versions.