windows下fopen,fclose断电数据丢失解决办法

#include <io.h>

//在fclose之前调用fflush和_commit,可以有效防止断电数据丢失       
fflush(file);
_commit(fileno(file));
fclose(file);

  

posted @ 2021-07-21 11:55  上位机  阅读(269)  评论(0编辑  收藏  举报