T
tirzan
Hi all,
I would like to copy a the last part of a (quite big) file into
another one (remove the header of few big images, basically remove the
first 1024 bytes).
I'm driving crazy, can you please help me?
This one of the attempts (but it just copies the file, how can I tell
to start copying from a certain position?):
std::fstream f(inputFileName, std::fstream::in|
std::fstream::binary);
std::istream_iterator<unsigned char> begin(f.seekg(1024,
std::ios::beg));
f << std::noskipws;
std::istream_iterator<unsigned char> end;
std::fstream f2(outputFileName, std::fstream:ut|
std::fstream::trunc| std::fstream::binary);
std:stream_iterator<char> begin2(f2);
std::copy(begin, end, begin2);
thanks very much!!!
T.
I would like to copy a the last part of a (quite big) file into
another one (remove the header of few big images, basically remove the
first 1024 bytes).
I'm driving crazy, can you please help me?
This one of the attempts (but it just copies the file, how can I tell
to start copying from a certain position?):
std::fstream f(inputFileName, std::fstream::in|
std::fstream::binary);
std::istream_iterator<unsigned char> begin(f.seekg(1024,
std::ios::beg));
f << std::noskipws;
std::istream_iterator<unsigned char> end;
std::fstream f2(outputFileName, std::fstream:ut|
std::fstream::trunc| std::fstream::binary);
std:stream_iterator<char> begin2(f2);
std::copy(begin, end, begin2);
thanks very much!!!
T.