You can use setmode(fileno(stdout), O_BINARY)
Wrap it in an ifdef if you want to keep it compatible with Linux.
See also: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=vs-2017
You can use setmode(fileno(stdout), O_BINARY)
Wrap it in an ifdef if you want to keep it compatible with Linux.
See also: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=vs-2017