recursive_directory_iterator exception

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-04-08T17:59:30Z Indexed on 2010/04/08 18:03 UTC
Read the original article Hit count: 240

Filed under:
|
|
|

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!

© Stack Overflow or respective owner

Related posts about boost

Related posts about filesystems