Ahm Baahk! Any way, i want to write a program the deletes a file, but i dont know how to do that. Any help? Thanks in advance!
Ahm Baahk! Any way, i want to write a program the deletes a file, but i dont know how to do that. Any help? Thanks in advance!
This war, like the next war, is a war to end war.
One way is remove().
Code:#include <iostream> #include <cstdio> using namespace std; int main(void) { char *filename = "\\dir\\file.txt"; if (remove(filename) == 0) cout << "File has been deleted" << endl; else cout << "Unable to delete file." << endl; return 0; }