c++ - Is there a way to truncate an open filestream? -


I am opening a file in both reading and writing. I am reading the contents of the file and want to clear the contents of the file after reading it, but before trying to close the stream I tried to search on Google but did not get any information.

Note: I do not want to shorten the file while opening it.

If it is not possible to use standard C ++ it is possible to promote any other library or to use QT?

Standard C ++ There is no support for this, but as usual the operating system does this : Under Windows under truncate Pausix, and SetEndOfFile .

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -