(will return the record to the newly created file except method),
CodePudding user response:
1. Open the original file, jump to the place you want to keep judge (reading),2. Get the current file pointer position ftell, access to the file size fseek jump to the end of the file, and hop back into began to save content,
3. All of the content of the remaining read into memory,
4. Close the file
5. Write opens the file (will clean up the file content)
6. To write the contents of the memory into the file,