Revision as of 17:41, 9 August 2010 edit1exec1 (talk | contribs)Pending changes reviewers, Rollbackers50,085 edits Reverted 1 edit by De728631; Restoring until a better solution was found. (TW)← Previous edit | Revision as of 17:43, 9 August 2010 edit undo1exec1 (talk | contribs)Pending changes reviewers, Rollbackers50,085 editsm {Next edit → | ||
Line 9: | Line 9: | ||
If successful, the function returns zero. Nonzero value is returned on failure and <code>errno</code> variable is set to corresponding error code. | If successful, the function returns zero. Nonzero value is returned on failure and <code>errno</code> variable is set to corresponding error code. | ||
==Sample usage== | |||
The following program demonstrates common usage of <code>remove</code>: | |||
<source lang="c"> | |||
int main() |
Revision as of 17:43, 9 August 2010
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
:
<source lang="c"> int main()