Older Newer
Mon, 20 Jan 2020 02:46:33 . . . . SyneRyder [Make code example and syntax C compatible]


Changes by last author:

Added:
= tmpnam =

== Syntax ==

char *tmpnam(char *s)

== Arguments ==

:s

::A pointer to a string where the filename will be stored. If s is NULL, the parameter is ignored.

== Return ==

A pointer to a temporary/internal string buffer containing the temporary filename. Note that this string will be modified by further calls to tmpnam, so it should be regarded as a single use return value.

== Description ==

Generates a guaranteed unique filename that can be used to create a temporary file.

== Comment ==

Note that the generated filename will contain directory path characters, ie it may be preceded by a backslash on Windows machines.

== Example ==

<code>

printf("A possible temporary filename: %s", tmpnam(NULL));

</code>

== See Also ==

fopen, fclose, tmpfile