Why doesn't fwrite() write a Binary File using “wb”, in C, on Mac OS X?

后端 未结 6 1392
鱼传尺愫
鱼传尺愫 2020-12-20 21:15

For the sake of learning C and understanding the difference between Binary Files and Text Files, I\'m attempting to write a string to file as both file types like so:

<
6条回答
  •  [愿得一人]
    2020-12-20 21:44

    You're right. This doesn't matter on Unix-like systems. Discussion from the cygwin camp. What difference did you expect to see? You are writing ASCII text to a file, not arbitrary binary data.

提交回复
热议问题