#include <io.h>
string dirPath = "C://....";
if (_access(dirPath.c_str(), 0) == -1) //如果文件夹不存在
_mkdir(dirPath.c_str()); //则创建
C++ 判断文件夹是否存在 并创建文件夹
最新推荐文章于 2024-05-22 14:08:44 发布
#include <io.h>
string dirPath = "C://....";
if (_access(dirPath.c_str(), 0) == -1) //如果文件夹不存在
_mkdir(dirPath.c_str()); //则创建