i know its a stupid question..but how do i delete a file?
Printable View
i know its a stupid question..but how do i delete a file?
WinAPI:
DeleteFile
Or (cross-platform):Code:#include <cstdio>
using namespace std;
//...
remove("myfile.txt");
string sFileName = "c:\\abc.txt";
system("del"+sFilename);
Sorry daok, but beside that your solution is neither portable nor native, it won't work
string file = "c:\\abc.txt";
string command = "del " + file;
system(command.c_str());
i decided to use doaks, becaus ei need delete all of the .ppm files
i think that was a best way i had for now...thanks for the help