Open a temporary file: how to use tmpfile : File Temp « File « C / ANSI-C






Open a temporary file: how to use tmpfile



#include <stdio.h>

int main ()
{
  FILE *file;
  file = tmpfile();

  // file is pointing to a temp file.

  fclose (file);
  return 0;
}

           
       








Related examples in the same category

1.Create temp file name
2. Generate a unique temporary filename: tmpnam Generate a unique temporary filename: tmpnam