Basic C to C++ conversion.