When I use fprintf:
fprintf(somefile,"%c",'\n');
It prints '\r\n' to the file. How do I just print '\n'?
I'm writing to a binary file. The code above is just for debugging.
When you open the file you have to open it in binary mode and not in text mode. This is done like this:
fopen("filename", "wb");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With