I\'m trying to read an entire stream (multiple lines) into a string.
I\'m using this code, and it works, but it\'s offending my sense of style... Surely there\'s an
Well, if you are looking for a simple and 'readable' way to do it. I would recomend add/use some high level framework on your project. For that I's always use Poco and Boost on all my projects. In this case, with Poco:
string text;
FileStream fstream(TEXT_FILE_PATH);
StreamCopier::copyToString(fstream, text);