Hello, I have been trying to open a file in append mode and write something in a determined position of the file, I have been trying to do it like this:

Qt Code:
  1. file.open("file.html", std::ios::out | std::ios::app);//Opens the file in output mode and append mode
  2. file.seekp(23, std::ios::end);//goes to 23 bytes(I think) before the end of file
  3. file << "something" << std::endl;//Writes that something
To copy to clipboard, switch view to plain text mode 

However even with the seekp function what i write always end's up at the end of the file. I would like to know how can I avoid that from happening.

Thanks for now.