C++ delete file <fstream> int main() { std::string filename="mylog.txt"; remove(filename.c_str()); return 0; }