I am writing a c++ program that executes shell commands. I am using the `popen()` function to run the commands. I would like my `exec` function to return `std::string` but I do not know how to read from a `FILE` into a string. Is there a way to do this without reading into a `char[]` first and then converting that into a string? If there are many which is the most efficient?