C/stdio.h/tmpfile

Материал из C\C++ эксперт
Перейти к: навигация, поиск

tmpfile: opens a temporary binary file for read/write operations and returns a pointer to the stream

<source lang="cpp"> //Declaration: FILE *tmpfile(void); //Return: returns a null pointer on failure.

  1. include <stdio.h>

int main(void){

 FILE *temp;
 if((temp=tmpfile())==NULL) {
   printf("Cannot open temporary work file.\n");
   exit(1);
 }

}

      </source>