开发者

Problem when using recursive_directory_iterator()

Why when I try to iterate all directories and subdirectories of a pa开发者_C百科rtition using recursive_directory_iterator() from Boost, when it reaches the end, Visual Studio 2010 gives me an Abort error ?

path Path = "e:\\";
for(recursive_directory_iterator it(Path); it != recursive_directory_iterator(); ++it)
{
    cout << *it << endl;
}


What version of Boost are you using? There was a bug related to empty directories until 1.35: https://svn.boost.org/trac/boost/ticket/1061

Is your directory (sometimes) empty?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜