C examples for stdio.h:tmpnam
function
<cstdio> <stdio.h>
Generate temporary filename
char * tmpnam ( char * str );
Parameter | Description |
---|---|
str | Pointer of characters where the temporary name will be stored. |
On success, a pointer containing the name for a temporary file
#include <stdio.h> int main ()//from ww w. j a v a 2 s . c o m { char buffer [L_tmpnam]; char * pointer; tmpnam (buffer); printf ("Tempname #1: %s\n",buffer); pointer = tmpnam (NULL); printf ("Tempname #2: %s\n",pointer); return 0; }