I allocate a char array, then I need to return it as a string, but I do not want to copy this char array, and then free it.
char* value = new char[required]; f(name, required, value, NULL);
I do not want to do this above. I need to put the array directly into the std string container. How can i do this?
Edit1:
I realized that I should not and that the line is not intended for this purpose. MB does someone know another container implementation for char array with which i can do this?
source share