C++ Language/Std/FilesystemAccess/NewlineConvertedFiles

If you know that a file's data is to be interpreted as characters, then you could choose to have special operating-system-conversion of every newline character. To use that kind of "newline-converted-file", open it with "w+" instead of "w+b".

Additional information about newline-converted-files