#include <stdlib.h>
#include <io.h>
#include <direct.h>
char szDrive[_MAX_DRIVE];
char szDir[_MAX_DIR];
char szFileName[_MAX_FNAME];
char szExtension[_MAX_EXT];
szFilePath [] = "C:\download\test\test1.exe"
_splitpath(szFilePath, szDrive, szDir, szFileName, szExtension);
==========================
결과
==========================
szDrive = "C:\"
szDir = "download\test"
szFileName = "test"
szExtension = ".exe"
#include <io.h>
#include <direct.h>
char szDrive[_MAX_DRIVE];
char szDir[_MAX_DIR];
char szFileName[_MAX_FNAME];
char szExtension[_MAX_EXT];
szFilePath [] = "C:\download\test\test1.exe"
_splitpath(szFilePath, szDrive, szDir, szFileName, szExtension);
==========================
결과
==========================
szDrive = "C:\"
szDir = "download\test"
szFileName = "test"
szExtension = ".exe"