begin to convert C to C++