Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - remove http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   remove

   Usage
   #include <io.h>
   int remove(const char *filename);

   Description
   remove deletes the file specified by the string filename.

   Example
   #include <stdio.h>
   #include <io.h>
   #include <stdlib.h>
   main()
   {
   int value;
   char buffer[13];
   char *result;

        printf("Input file to remove: ");
        result = gets(buffer);
        value = remove(result);
        if(value == 0)
             printf("Erased [%s] from disk\n",result);
        else
             printf("Unable to erase [%s]\n",result);
   }

   Return Value
   Returns  0  if  the file was successfully deleted or -1  if  an  error
   occurred and errno is set.


See Also: Unlink

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson