TMPFILE - create a temporary file.

(ANSI Standard)

Usage:

#include <stdio.h>
fp = tmpfile();

Where:

FILE *fp;
is a file pointer for the temporary file.

Description:

"tmpfile" uses "tmpnam" to create a name for a temporary file, then opens the file with "fopen" using the "wb+t" (update) option. If the file cannot be opened for some reason, "tmpfile" returns a NULL pointer.

A file created with "tmpfile" is automatically removed when the file is closed or when the program terminates.

The files created by "tmpfile" will be GCOS8 temporary files.

See Also:

expl c lib tmpnam

expl c lib fopen

expl c lib mktemp

Copyright © 2000, Thinkage Ltd.