We have a legacy method that returns a vector
of char pointers i.e., vector<char *>
.
Now, I need to process only strings (std::string
). How can I do this?
This question may sound simple, but I run into couple of websites which depicted that these sort of considerations might lead to memory leaks.
Now, I either want to get a vector<string>
or even a string without any memory leaks. How can I do this?