[C] 建立唯一的文件名 →→→→→进入此内容的聊天室

来自 , 2021-04-10, 写在 C, 查看 186 次.
URL http://www.code666.cn/view/d6bcb486
  1. #include <dir.h>
  2. #include <stdio.h>
  3.  
  4. int main(void)
  5. {
  6.    /* fname defines the template for the
  7.      temporary file.  */
  8.  
  9.    char *fname = "TXXXXXX", *ptr;
  10.  
  11.    ptr = mktemp(fname);
  12.    printf("%s\n",ptr);
  13.    return 0;
  14. }

回复 "建立唯一的文件名"

这儿你可以回复上面这条便签

captcha