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?
精彩评论