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.
Reputation Points: 344
Solved Threads: 116
Practically a Master Poster
Offline 670 posts
since May 2008