且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Windows 中无需回车 (CR) 将新行打印到文本文件

更新时间:2023-12-04 10:56:46

以二进制方式打开/创建文件

Open/create the file in binary mode

file = fopen(tracefile, "wb");
                          ^ Binary mode

否则

fprintf(file,"
"); /* In text mode this appends two characters. */