How can i create a temporary folder in tmp folder using C++ language.
I have 3 volumes. Leopard, Development and 10.6 (in Mac OS X) and I want to create a temp directory in current home directory.
Here is my code. I am confused about this line char* tempdir = "/Volumes/Development/NewFolder.XXXXXX":
if (!mkdtemp(tempdir))
fprintf(stderr, "Not able to create directory");
Under POSIX, you can use
mkdtempto create a directory with a unique name. On Windows, useGetTempPathto retrieve the name of the temp directory, then create a directory with a random name there.