1. 程式人生 > >VS 檢查資料夾是否存在,不存在建立資料夾

VS 檢查資料夾是否存在,不存在建立資料夾

        #include <direct.h>

        #include<io.h>

string resultpath = “C:\\result";
if (_access(resultpath.c_str(), 0) == -1)
{
int i = _mkdir(resultpath.c_str());
}