H
horneye
After i use fstream to open a file, how can i use the fstream object
to clear file's content?
to clear file's content?
horneye said:After i use fstream to open a file, how can i use the fstream object
to clear file's content?
True, there will now be an empty file called "filename", but it dependsAlan Johnson said:std:fstream("filename") ;
Just opening it as such should be sufficient to cause the data to be
truncated.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.