Delete a file: how to use remove : File Delete « File « C / ANSI-C






Delete a file: how to use remove



#include <stdio.h>

int main ()
{
  if( remove( "m.txt" ) == -1 )
        perror( "Error deleting m.txt" );
  else
        puts( "File deleted" );
  return 0;
}

           
       








Related examples in the same category

1.Delete file
2.Delete file 2
3.Delete a file