Namespaces
Variants
Views
Actions

Difference between revisions of "c/io/tmpnam"

From cppreference.com
< c‎ | io
m (Text replace - "{{cpp|" to "{{c|")
(+see cpp)
Line 24: Line 24:
 
{{dcl list begin}}
 
{{dcl list begin}}
 
{{dcl list template | c/io/dcl list tmpfile}}
 
{{dcl list template | c/io/dcl list tmpfile}}
 +
{{dcl list see cpp | cpp/io/c/tmpnam}}
 
{{dcl list end}}
 
{{dcl list end}}

Revision as of 12:36, 19 April 2012

Template:c/io/sidebar

Defined in header <stdio.h>
char *tmpnam( char *filename );

Creates an unique filename and stores it in character string pointed to by filename. The function is capable of generating up to TMP_MAX of unique filenames, but some or all of them may be in use in the filesystem and thus not suitable return values.

Contents

Parameters

filename - pointer to the character string to be used as a result buffer. If NULL is passed, a pointer to an internal static buffer is returned.

Return value

filename if filename was not NULL. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, NULL is returned.

Example

See also

Template:c/io/dcl list tmpfile