重新创建同名文件即可。
FILE *hf;hf=fopen(szFilePath, "w");if(!hf) szFilePath[0]=0;else fclose(hf);
文件流有一个clear()函数的
shanchu