create a temporary binary file
#include <stdio.h> FILE *tmpfile( void );
The tmpfile() function creates a temporary binary file that's automatically removed when it's closed or when the program terminates. The file is opened in update mode.
The tmpfile() function returns a pointer to the stream of the file that it created. If the file cannot be created, the tmpfile() function returns NULL. When an error has occurred, errno contains a value that indicates the type of error that has been detected.
errno, fopen(), freopen(), tmpnam()
#include <stdio.h> static FILE *TempFile; void main() { TempFile = tmpfile(); /* . */ /* . */ /* . */ fclose( TempFile ); }
ANSI
All (except DOS/PM)