From what you said in 2) you apparently did not post all the code. If that is correct then I suspect the problem is the iterator is getting invalidated when a new string is put into the vector.
If you are attempting to build a list of directory and their subdirectory names then maybe using recursion would be a better approach.
Here is an example program how to do that. It gets all the file names as well, but you can easily modify the code to do what you want with it.
Last edited by Ancient Dragon; May 14th, 2008 at 9:28 am.
I told Santa what I wanted for Christmas and he washed my mouth out with soap.