fwrite()不用写字符串结束标志
fwrite(buf, 1, strlen(buf), fp);//正确
fwrite(buf, 1, strlen(buf) + 1, fp);//正确
fwrite()不用写字符串结束标志
fwrite(buf, 1, strlen(buf), fp);//正确
fwrite(buf, 1, strlen(buf) + 1, fp);//正确
转载于:https://www.cnblogs.com/xpylovely/p/11395968.html