Movatterモバイル変換


[0]ホーム

URL:


Logo

User Tools

Site Tools

You are here:start »c »stdio.h »remove

Sidebar

c:stdio.h:remove

remove

intremove(constchar*filename);

Removes specified file. Returns non-zero on failure.

Example Source

/*  * remove example code * http://code-reference.com/c/stdio.h/remove */ #include<stdio.h>/* including standard library *///#include <windows.h> /* uncomment this for Windows */ #define FILENAME"test_tmp.txt" int main(void){FILE*tmpfile;char string[20];tmpfile=fopen(FILENAME,"w"); if(tmpfile==0){perror("cannot open file");} fprintf(tmpfile,"temporary file for c remove example\n");fclose(tmpfile); remove(FILENAME);/* you can also use remove("test_tmp.txt"); */ return0;}

output

  ./remove    file will be created  write text into file "temporary file for c remove example"  close the file
  file will be deletet

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/stdio.h/remove.txt · Last modified: 2024/02/16 01:05 (external edit)

Page Tools

Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
CC Attribution-Share Alike 3.0 UnportedDriven by DokuWiki
Tweet this link
ImpressumDatenschutz


[8]ページ先頭

©2009-2025 Movatter.jp