"Fluke" <fl***@something.com> wrote in message
news:IQ********************@twister01.bloor.is.net .cable.rogers.com...
I'm looking for a way to copy a segment of a binary file.
ie. from start position (>=0) to end position (<= eof).
Any suggestions? (preferably stl)
void copy_segment(istream& input, streampos start, streampos end,
vector<char>& output)
{
input.seekg(start);
output.resize(end - start);
input.read(&output[0], end - start);
}
Untested code, and obviously could do with the addition of some error
checking.
john