main() { int a; char name[30]; printf("enter the name of the file to be deleted"); gets(name); a = remove(name); if(a == 0) { printf("the file has been deleted sucessfully"); } else { printf("FILE NOT FOUND"); perror("ERROR"); } getch(); }
a = remove(name);
a = remove("the_file_name"); //"the_file_name" is the name of the file you want to delete.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)