I'm trying to read data from a text file, clear it, and then write to it, in that order using the fstream
class.
My question is how to clear a file after reading from it. I know that I can open a file and clear it at the same time, but is there some function I can call on the stream to clear its contents?