I'm trying to print all .pdf files from a partition using Boost.Filesystem and Boost.Regex but when I run my program, Visual Studio 2010 gives me an Abort error. Here is my code:
path Path = "e:\\";
boost::regex reg("*.pdf");
for(recursive_directory_iterator it(Path); it != recursive_directory_iterator(); ++it)
{
if(boost::regex_search(it->string(), reg))
{
cout << *it << endl;
}
}