template A pointer to a string that is replaced with a unique filename. The string in the template argument must be a filename with six trailing Xs. flags Zero or more of the flags for the open function.