Revision as of 18:00, 9 August 2010 editSarekOfVulcan (talk | contribs)Autopatrolled, Administrators51,754 editsm Adding category Category:C programming language (using HotCat)← Previous edit |
Latest revision as of 23:46, 27 April 2023 edit undoSteel1943 (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Pending changes reviewers, Rollbackers, Template editors197,279 edits Rcat |
(10 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
|
|
#REDIRECT ] |
|
{{lowercase|title=remove}} |
|
|
'''remove''' is a ] in ] that removes a certain file. It is included in the ] ] <code>]</code>. |
|
|
|
|
|
|
|
{{Redirect category shell| |
|
The prototype of the function is as follows: |
|
|
|
{{R with history}} |
|
|
|
|
|
{{R to anchor}} |
|
<source lang="c"> |
|
|
|
}} |
|
int remove ( const char * filename ); |
|
|
</source> |
|
|
|
|
|
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"> |
|
|
|
|
|
#include <stdio.h> |
|
|
|
|
|
int main() { |
|
|
const char *filename = "a.txt"; |
|
|
remove (filename); |
|
|
return 0; |
|
|
} |
|
|
</source> |
|
|
|
|
|
] |
|