|
From: Hans-Bernhard B. <br...@ph...> - 2003-11-25 12:57:29
|
On Tue, 25 Nov 2003, Petr Mikulik wrote: > Man page of tmpnam() and of tempnam() says: > Never use this function. Use mkstemp(3) instead. > > Is there any safe and portable way to create a file in a temporary > directory, like /tmp or C:\TMP? <stdio.h>: FILE *tmpfile(void) It may not be particularly safe, but it's as portable as they come, being an ANSI/ISO C Standard Library function. You get no control whatsoever about the directory it places the file in, though. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |