C標準庫之檔案目錄操作函式——_tempnam
功能:
_tempnam函式用於生成一個臨時檔案
(注意:臨時資料夾路徑優先選用環境變數中的路徑,引數中的路徑第二優先。所以有可能出現引數指定的路徑和實際不同的情況)
函式原型:
char * _tempnam (char * dir, char * prefix);
char * _tempnam (char * dir, char * prefix);
引數:
引數
|
說明
|
dir
|
臨時資料夾路徑
|
prefix
|
檔名
|
返回值:
生成的臨時檔案路徑
要求:
函式
|
需要的標頭檔案
|
_tempnam
|
<stdio.h>
|
舉例:
- #include <stdio.h>
- int main(void)
- {
- char * file = _tempnam("D:\\temp", "file");
- if(NULL != file)
- {
- printf("%s\n", file);
- }
- return 0;
- }
相關文章
- C++ 字串 cctype 標頭檔案標準庫處理函式C++字串函式
- C++11 標準庫 bind 函式C++函式
- 檔案目錄許可權操作
- C語言之標準檔案操作C語言
- linux的部分檔案目錄操作語句Linux
- apolloxlua標準庫require函式說明UI函式
- Linux中操作工作目錄和檔案目錄Linux
- 檔案目錄(MOOC)
- 檔案目錄配置
- C++標準庫、C++標準模版庫介紹C++
- c/c++ 標準庫 set 自定義關鍵字型別與比較函式C++型別函式
- C++標準庫名字和標頭檔案--表C++
- uboot i2c 操作函式記錄boot函式
- Redhat:檔案目錄管理Redhat
- C++標準庫C++
- Linux基礎學習系列——Linux檔案目錄操作命令Linux
- C 標準庫 – string.h之strstr使用
- C 標準庫 – string.h之memchr使用
- C 標準庫 – string.h之strrchr使用
- C 標準庫 – string.h之memmove使用
- C 標準庫 – string.h之memcmp使用
- C 標準庫 – string.h之strspn使用
- C 標準庫 – string.h之strpbrk使用
- 檔案管理 檔案目錄概念
- c/c++ 標準庫 vectorC++
- python標準庫目錄Python
- 標準庫之template
- C++標準庫:chronoC++
- C++標準庫:randomC++random
- C標準庫學習
- 函式指標、回撥函式、動態記憶體分配、檔案操作函式指標記憶體
- Hive函式(內建函式+自定義標準函式UDF)Hive函式
- 標準IO常用函式介面函式
- C++ 序列操作函式C++函式
- C++ 專案目錄結構C++
- Linux學習之linux檔案目錄結構彙總Linux
- idea訪問resources檔案目錄Idea
- [C++] 成員函式指標和函式指標C++函式指標
- AT&T彙編之使用C庫函式函式