Hi guys,

I'm writing binary data to a file using fwrite. I can't get rid of
'0x0D' whenever it writes '0x0A'. I use hex-viewer to check data.
For example, if data is '0x01 0xFF 0x0A 0x0E', it writes '0x01 0xFF 0x0D 0x0A 0x0E'
Is this because fwrite writes by byte, A is newline ASCII, so D (carriage return) always shows up?
I need to get rid of D, please help.

Use "wb" as the write mode

dammit!(to myself)
thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.