#include <stdio.h>FILE *tmpfile(void);

The tmpfile( ) function opens a temporary binary file for read/write operations and returns a pointer to the stream. The function automatically uses a unique filename to avoid conflicts with existing files.

The tmpfile( ) function returns a null pointer on failure; otherwise, it returns a pointer to the stream.

The temporary file created by tmpfile( ) is automatically removed when the file is closed or when the program terminates.

You can open TMP_MAX temporary files (up to the limit set by FOPEN_MAX).

A related function is tmpnam( ).

C(s)C++ Programmer's Reference
C Programming on the IBM PC (C Programmers Reference Guide Series)
ISBN: 0673462897
EAN: 2147483647
Year: 2002
Pages: 539 © 2008-2017.
If you may any questions please contact us: