why don't you just use the std::string and let the + operator concatenates the string for you. I saw couts here so I assume this is C++. I can't see your point of writing an existing function. Do you think you can implement a better one?