我想实现对已有文件中的部分内容的修改,比如文件中的"abcdef"我想修改为"cbadef",其余位置的文件内容不做更改,并且将结果存到原文件中,请问应该如何操作?
学习是最好的投资!
Just rewrite it, it will overwrite the original
Use the lseek(int filedes, off_t offset, int whence) function to operate with the offset of the file pointer
To overwrite without changing the file length, just lseek directly
Just rewrite it, it will overwrite the original
Use the lseek(int filedes, off_t offset, int whence) function to operate with the offset of the file pointer
To overwrite without changing the file length, just lseek directly