The temporary file created is automatically deleted when the stream is closed (fclose) or when the program terminates normally.
Parameters
noneReturn Value
If successful, the function returns a stream pointer to the temporary file created.If the file cannot be created, NULL is returned.
Example
| 1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
This code creates a temporary file and then deletes it closing the stream.
See also
| fopen | Open file (function) |
| tmpnam | Generate temporary filename (function) |
