may be like this, it is abstracted from MSDN
remove, _wremove
Delete a file.
int remove( const char *path );
int _wremove( const wchar_t *path );
....................
#include <stdio.h>
void main( void )
{
if( remove( "remove.obj" ) == -1 )
perror( "Could not delete 'REMOVE.OBJ'" );
else
printf( "Deleted 'REMOVE.OBJ'\n" );
}
Output
Deleted 'REMOVE.OBJ'
转载于:https://www.cnblogs.com/kingboys/archive/2013/05/09/3069385.html