help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MinGW/Windows CRLF lunacy


From: Matt
Subject: MinGW/Windows CRLF lunacy
Date: Mon, 09 May 2005 12:49:41 GMT
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Fedora/1.7.6-1.2.5

I'm using g++ as packaged in MinGW running g++ from a command prompt under XP Home.

I'm filling a buffer with arbitrary binary data, then writing it to a file using fwrite.

I find that my file contains more bytes than I wrote, seemingly an extra byte for every '\n' that appeared in the buffer at an address divisible by 4.

Really I can hardly believe it, but there it is. I have no such problem running the program under Linux.

What trick do I have to use to make the file contain exactly the data I send to fwrite?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]