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

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -