Create temp file name : File Temp « File « C / ANSI-C






Create temp file name


#include <stdio.h>

int main(void)
{
  char name[40];
  int i;

  for(i=0; i<3; i++) {
    tmpnam(name);
    printf("%s ", name);
  }

  return 0;
}

           
       








Related examples in the same category

1. Open a temporary file: how to use tmpfile
2. Generate a unique temporary filename: tmpnam Generate a unique temporary filename: tmpnam