Answers for "what does clear do in a file c++"

C++
5

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