I have an large string buffer, and a input stream
basic_string<uint8_t> *buf = ......;
istream in = ......;
What is the most efficient way to read a part of the file into the string? Say, the 0xE3CC'th to 0x1A481'th bytes from the file.
Here istream::read seems not an answer since it reads to a raw char[]. Since the data is quite large, having a temporary variable is [in]efficient.
And sadly, I don't have C++0x, so copy_n can't be used. What would you suggest? Thanks.