cpp/io/c/tmpnam

Creates a unique filename that does not name a currently existing file, and stores it in the character string pointed to by. The function is capable of generating up to tmp_max of unique filenames, but some or all of them may already be in use, and thus not suitable return values.

std modifies static state and is not required to be thread-safe.

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