binary file parsing in C++
Segher Boessenkool
segher@kernel.crashing.org
Thu Dec 11 18:49:00 GMT 2003
On 11-dec-03, at 0:20, Justin Findlay wrote:
> I am perplexed at what is happening here. This is a simple script that
> reads a file one byte at a time, and writes it to another file one
> byte at
> a time, but somehow there is an extra character at the end of the
> output
> file.
end-of-file only gets set after you try to read past the end of the
file,
not when you are _at_ the end of the file.
Segher
More information about the Gcc-help
mailing list