Converted C to C++.