84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
我想实现对已有文件中的部分内容的修改,比如文件中的"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