FILE * tmpfile ( void );
Open a temporary file.
Creates a temporary binary file for update ( w+b mode -- see fopen for details). The filename is unique to avoid any conflict with existing files.
The temporary file created is automatically deleted when it is closed (fclose) or when the program terminates normally.
If successful, the function returns a file pointer (stream) to the temporary file created.
If the file can not be created a NULL pointer is returned.
Defined in ANSI-C.
/* tmpfile example */
FILE * pFile;
pFile = tmpfile ();
// temporary file created. code here.
This code creates a temporary file and then deletes it closing the stream.