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

sonata admin - how to add ManyToOne property field in configureListfield in sonataAdmin -

wpf - ControlTemplate with changes for every class -

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