vbx_wx -6 Junior Poster

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;
		}
	}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.