To delete or remove a file in C++ you can use the remove function from stdio.h like follows:
#includeint main(){ if(remove("myfile.txt") == -1) fprintf(stderr,"Remove failed"); // your code ....... }
To delete or remove a file in C++ you can use the remove function from stdio.h like follows:
#includeint main(){ if(remove("myfile.txt") == -1) fprintf(stderr,"Remove failed"); // your code ....... }