qt c++递归创建文件夹 包含中文

it2023-05-21  76

 

 

 

#include <direct.h> void generateDirecorys_cbc(string path){//支持中文 string tmpPath = ""; for(auto ch : path){ tmpPath += ch; if(ch == '/' || ch == '\\'){ if(_access(tmpPath.c_str(), 0) != 0){ int ret = _mkdir(tmpPath.c_str()); if(ret != 0){ cout<<"mkdir error~"<<endl; return; } } } } }

 

最新回复(0)