Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 33,238 of 33,346    |
|    Jens Schmidt to Joe Bentley    |
|    Re: Is the binary open mode required?    |
|    08 Oct 13 15:50:13    |
      From: Jens.Schmidt-HH@gmx.de              Joe Bentley schrieb:              > I don't see any difference between using the binary open mode or not when       > writing text or binary files? Is there a difference or am I missing       > something?              Yes, there is definitely a difference, except you won't see any on a U**X       system. The most visible difference is how end-of-line is handled. Inside       the program you always output '\n', in the file system this might happen       for text files:        Unix or similar: '\n' is unchanged        MacOS: '\n' is replaced by '\r'        MS Windows: '\n' is replaced by "\r\n"        VMS: depends on file structure, for system-compatible text files '\n' is        dropped, instead a record length is prepended to the line.              > My example:       [removed]              You example doesn't use any problematic character. Try again with writing       '\n'.       --       Greetings,        Jens Schmidt                      [ See http://www.gotw.ca/resources/clcm.htm for info about ]        [ comp.lang.c++.moderated. First time posters: Do this! ]              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca