I would like to use either fstream, or preferably QFile, to delete the contents of the file after a certain position (this is not the beginning or end of the file). Therefore, I first go to this position with QFile::seek(long)or equivalent at a constant time , and then I would like to remove the rest of the content, also at a constant time. Which approach do you recommend?
source
share