function
<cstdio>
removeint remove ( const char * filename );
Remove file
Deletes the file whose name is specified in filename.This is an operation performed directly on a file identified by its filename; No streams are involved in the operation.
Proper file access shall be available.
1
2
3
4
5
6
7
8
9
10
11
/* remove example: remove myfile.txt */
#include <stdio.h>
int main ()
{
if( remove( "myfile.txt" ) != 0 )
perror( "Error deleting file" );
else
puts( "File successfully deleted" );
return 0;
}
File successfully deleted
Otherwise, a message similar to this would be written to stderr:
Error deleting file: No such file or directory
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4