That said, I am not entirely sure if overloading operator[] is the right thing to do. It kind of makes sense to me, i.e., a directory entry is a file (or information about a file), but then using a named member function might be clearer.Originally Posted by MK27
Oh, and if you do overload operator[], you should const overload too: provide a version that works when the directory object is const.
Finally, you might want to take a look at Boost.Filesystem.