This is purely C code. Why is it on the C++ forum?

If you are planning to use C++ - why not to use std::string?