Your problem is inside the while loop.
while (whileIter != tmpCsvFile.end())
{
whileIter++;
if (fileName == (whileIter->fileName).c_str())
break;
}
You have advanced the iterator (possibly to the end) before you try to test the filename. Put the fileName test (with the break) before the iterator advancement.
Murtan
Practically a Master Poster
671 posts since May 2008
Reputation Points: 344
Solved Threads: 116