Revision as of 19:58, 20 June 2011 edit1exec1 (talk | contribs)Pending changes reviewers, Rollbackers50,085 edits →External links: added link to C++ specific documentation← Previous edit | Revision as of 07:36, 27 September 2011 edit undoVadmium (talk | contribs)5,381 editsm →External links: Category:C programming language → Category:C standard libraryNext edit → | ||
Line 29: | Line 29: | ||
* | * | ||
] | ] |
Revision as of 07:36, 27 September 2011
remove is a function in C programming language that removes a certain file. It is included in the C standard library header file stdio.h
.
The prototype of the function is as follows:
int remove ( const char * filename );
If successful, the function returns zero. Nonzero value is returned on failure and errno
variable is set to corresponding error code.
Sample usage
The following program demonstrates common usage of remove
:
#include <stdio.h> int main() { const char *filename = "a.txt"; remove (filename); return 0; }