VMS Help  —  CRTL  mktemp
    Creates a unique filename from a template.

    Format

      #include  <stdlib.h>

      char *mktemp  (char *template);

1  –  Function Variants

    The mktemp function has variants named _mktemp32 and _mktemp64
    for use with 32-bit and 64-bit pointer sizes, respectively.

2  –  Argument

 template

    A pointer to a buffer containing a user-defined template. You
    supply the template in the form, namXXXXXX. The six trailing Xs
    are replaced by a unique series of characters. You may supply
    the first three characters. Because the template argument is
    overwritten, do not specify a string literal (const object).

3  –  Description

    The use of mktemp is not recommended for new applications. See
    the tmpnam and mkstemp functions for the preferable alternatives.

4  –  Return Value

    x                  A pointer to the template, with the template
                       modified to contain the created filename. If
                       this value is a pointer to a null string, it
                       indicates that a unique filename cannot be
                       created.
Close Help