从boost :: filesystem创建目录成功,但是没有创建目录

Ton*_*ion 13 c++ filesystems boost

我有以下代码,虽然调用boost::filesystem::create_directory返回true,但我看到我的项目文件夹中没有创建目录.

这可能是什么原因?

boost::filesystem::path dir("newdir");
if (boost::filesystem::create_directory(dir))
    std::cout << "Success" << "\n";
Run Code Online (Sandbox Code Playgroud)

我正在使用VS2008和Win7 Home Premium.

par*_*mar 8

您可能会遭受文件夹虚拟化.还尝试使用完整路径创建目录,这样您就不会受到当前应用程序目录的影响