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
You can try using something from algorithms. I have to get ready for work but here's a very quick stab at things (there's got to be a better way):
copy( istreambuf_iterator(stream), istreambuf_iterator(), back_inserter(s) );