recursive_directory_iterator exception
- by Jon
I'm writing a simple program which moves files on my desktop to new location. I don't understand why it crashes after the file has been moved.
for(recursive_directory_iterator it(desktop), end; it != end; ++it)
{
if(it->path().leaf() == fileToMove)
{
rename(*it, newPath);
}
}
A point in the right direction would be appropriated. Thanks!