D
dover
How to empty a file when using ofstream to write bytes like
ofstream file("data.txt");
....
The second time bytes for writing could be shorter than those written at
first time and I don't want to have some bytes left from the first time
after writing second time. How to handle the problem? Thanks!
ofstream file("data.txt");
....
The second time bytes for writing could be shorter than those written at
first time and I don't want to have some bytes left from the first time
after writing second time. How to handle the problem? Thanks!