Hello, I am pretty new to C++, and I have a question:
I am, and have been using Dev-C++
I used this code, to delete a text file on my desktop. The first time around, it worked perfectly. Given the file example name of "dafile".
#include <stdlib.h> // needed to use system() function
int main() {
system("del dafile.txt");
return 0;
}
I compiled the file, and ran it, it worked. However, later on, I used the same code, ran it in the same conditions and nothing happened at all.
This system command worked fine the first time around, I have no idea what I have done wrong.
I have tried running this on other computers, in the same conditions, and nothing worked. Has it anything to do with the complied data? There was no errors when I checked it the second time...
Thank you. Any help would be greatly appreciated!
*Sorry about spelling errors*