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,237 of 33,346    |
|    Thomas Richter to Joe Bentley    |
|    Re: Is the binary open mode required?    |
|    08 Oct 13 11:19:05    |
      From: thor@math.tu-berlin.de              On 08.10.2013 13:51, Joe Bentley wrote:       > 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, I afraid you are missing something. Not the whole world works like       Unix where the linefeed is represented by a single character. On some       other platforms, two characters are required. Thus, in the binary mode,       only a single character is written whenever a \n is written to a stream,       whereas in text mode, on some platforms two characters are written. The       same works in reverse direction for reading files.              Greetings,        Thomas                     --        [ 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