Richard Dobson wrote:
>
> What I now want to know, is why it works without the 'b' under all the
> other compilers, gcc included? Does the ANSI standard matter, anyway?
>
gcc basically ignores 'b', it is there only for ANSI compatibility. On
unix and derivatives it doesn't matter, no translation is done. But VC++
will translate \r\n to \n in text files to be compatible with standard
systems :-). This allows one to write code that always expects \n as a
line ending even though the underlying line-ending babel may be \r, or \r\n.
It can be the cause of many hours of frustration, since many files won't
be affected. Only when a byte value of 13 is followed by 10.
Thomas
This archive was generated by hypermail 2b29 : Wed May 10 2000 - 12:15:28 EDT