Home

Il Fri, 03 Aug 2007 14:32:19 -0700, Ehsan ha scritto:


> It works but could you explain more what's wrong with just 'w'?

On Unix-like systems newline means '\n'

On Window newline means '\r\n'

So, when you open a file on Window with 'w' option, Win replace
downloaded '\n' with a local '\r\n' and the file isn't readable. If you
use 'wb' you say that you want a binary copy ('b' option) and Win doesn't
replace anything.

Hope it is useful,

bye
Fabio

previous
next

Re: How bool data type is implemented in C++
Re: ostream operator and setw
Re: Why the simple code can not compile?
Re: pronunciation on malloc thing
Re: Python 3K or Python 2.9?
Zmniejszanie zdjęć
tanie meble katowice
bjbeierde.com
okna lubin
wzory tatuaży