First of all, don't use
std::string, then everything else becomes so easy!
std::string s = "Hello"; std::string greet = s + " World"; //concatenation easy!
Easy, isn't it?
Now if you need
char const * for some reason, such as when you want to pass to some function, then you can do this:
assuming this function is declared as:
some_c_api(char const *input, size_t length);
std::string yourself starting from here:
Hope that helps.