您的位置:首页 > 编程语言 > C语言/C++

C++ 递归创建目录

2014-07-29 22:39 211 查看
<pre name="code" class="cpp">#include <shlobj.h>
#pragma comment("shell32.lib")
string strPath("F:/a\\a/a");
string::size_type pos;
while ((pos = strPath.find("/")) != string::npos)
{
strPath = strPath.replace(pos, 1, "\\");
}

SHCreateDirectoryEx(NULL, strPath.c_str(), NULL);


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐