Completely and totally incorrect.
Perhaps I should clarify. Replace "is" with "maps to":
'\n' maps to CR-LF, or 0x0D0A
'\n' is a single character on every compliant
C and C++ compiler in the world.
I wrote "In DOS and Windows", not "In compliant C and C++
compilers".
Newline is a single character in registers and RAM during
program execution, yes, but must be converted to 0x0D0A
when talking to MS-DOS or MS-Windows.
It is the C++ streams and C FILE streams that map the
single '\n' character into something implementation
specific (which on most non-UNIX platforms is 0D 0A).
I don't know about "most non-UNIX platforms", but yes,
C and C++ implimentations on MS-DOS and MS-Windows do
have to convert '\n' to 0x0D0A (outbound) or 0x0D0A to
'\n' (inbound) when talking to the operating system.
This is what I was trying to say in my original post.
--
Cheers,
Robbie Hatley
Tustin, CA, USA
email: lonewolfintj at pacbell dot net
web: home dot pacbell dot net slant earnur slant