Answers for "clear file before writing c++"

C++
4

clear file before writing c++

std::ofstream ofs;
ofs.open("test.txt", std::ofstream::out | std::ofstream::trunc);
ofs.close();
Posted by: Guest on May-16-2020

Browse Popular Code Answers by Language