This is an old revision of this page, as edited by 1exec1 (talk | contribs) at 17:15, 22 August 2010 (Reverted 2 edits by BiT; Example is not appropriate and invalid as argv does not necessarily refer to the executable itself. See how exec() is invoked. (TW)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 17:15, 22 August 2010 by 1exec1 (talk | contribs) (Reverted 2 edits by BiT; Example is not appropriate and invalid as argv does not necessarily refer to the executable itself. See how exec() is invoked. (TW))(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)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; }Category: