📜  在编写 C++ 代码示例之前清除文件

📅  最后修改于: 2022-03-11 14:44:48.456000             🧑  作者: Mango

代码示例1
std::ofstream ofs;
ofs.open("test.txt", std::ofstream::out | std::ofstream::trunc);
ofs.close();