From: Andrei Danaila (adanaila_ca_at_[hidden])
Date: 2006-09-29 12:02:00


Hi,

Noob question, how do we rename a file obtained from a directory_iterator.
i'm attempting to compile the following much simplified example.

directory_iterator i("whateverPath");
i++;
// i know i++ exists
rename (i->current_path(), TestRename);

When i try to compile the above , it tells me that i is actually a "path"
object not a directory iterator.
However, when i try to write something like

path test=i;

it tells me i is actually a directory iterator not a path object.
I know I'm, probably doing something really stupid but would appreactiate
some help nonetheless.
Thank you