header file: unistd.h
int unlink(const char *filename);
header file: stdio.h
int _unlink(const char *filename);
This function deletes the specified file.
The Windows and Unix versions of this function differ only in
name and the needed header file; changing the name should be all
that is required to port between the two operating systems. Windows
also provides a similar function, _wunlink, that has wide-character
support.
Example of Use in Windows
#include <stdio.h>
int main( void )
{
if(_unlink("crt_unlink.txt"))
printf("Deleted 'CRT_UNLINK.TXT'\n");
else
perror("Could not delete 'CRT_UNLINK.TXT'");
}