_makepath and _splitpath 分析路徑


_makepath 和 _splitpath 都是分析路徑的函數  

一個path 分爲drive, dir, fname, ext 四部分

_makepath 將四個部分組裝成一個path

_splitpath將一個完整的path分成四部分


void _makepath( char *path, const char *drive, const char *dir, const char *fname, const char *ext );

void _splitpath( const char *path, char *drive, char *dir, char *fname, char *ext );


eg: c:/test/helloworld/makepath.cpp

drive: c

dir: /test/helloworld/

fname: makepath

ext: .cpp


另:_makepath_s _splitpath_s 分別爲兩個函數的安全形式








發佈了40 篇原創文章 · 獲贊 4 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章