没有直接删除文件中某一段内容,如一个字符或者一个字符串,需要先将文件内容读取出来,然后修改,最后再写回文件中,文件比较大的话,可以考虑使用内存映射的方法去做。
C语言中使用fopen/fread/fwrite/fclose()操作文件。
直接删除文件夹中的某一个文件可以使用remove()函数。
Visual C++ enthusiast, like network programming and driver development. At present is being engaged in the WinCE/Windows Mobile platform embedded development.