|
tmpfilefunction
<cstdio> FILE * tmpfile ( void ); Open a temporary file Creates a temporary binary file, open for update (wb+ mode -- see fopen for details). The filename is guaranteed to be different from any other existing file.The temporary file created is automatically deleted when the stream is closed (fclose) or when the program terminates normally. ParametersnoneReturn ValueIf successful, the function returns a stream pointer to the temporary file created.If the file cannot be created, NULL is returned. Example
This code creates a temporary file and then deletes it closing the stream. See also
|