i have a task where i have to perform a certain comparison among all files in a directory. this is not that program. i'm familiarizing my self with the filesystem library first. however, i can't seem to get nested for loops to work. i changed the inner loop to a while loop so i could put checkpoints at each statement and see where it's failing. it fails when it reaches the very end of the directory. can anyone tell me why it is failing where it is?
i also omitted a bunch of code that is not relevant to this issue (and is commented out in my source file), so if it looks like this function doesn't actually do anything, well, it doesn't. except crash, of course.
for anyone who may look at this thread, the answer is fairly simple. j and i are pointers. the while loop ends because j is equal to end (as is i), then it returns to the for loop which increments i (and j) which are no longer equal to end, since they are past end and my program cries and so do i, but all is good now, cplusplus.com/forum