Random file names

How can I create a temporary file name which is unique to the process which spawned it. I’ve been playing around with stdlib’s mktemp(), but is there something built in? Can anyone give me a quick example of it’s usage.

Cheers,
Brandon Drummond

Hi,

you can use TString base("mytmpfile"); FILE* myTempfile = gSystem->TempFileName(base); fprintf(myTempfile, "We have written number %d to a temp file", 42); fclose(myTempfile)

Cheers, Axel.