So, when I run this, it verifies the file correctly the first time. If I type 'bob.txt' it does the following stuff which I omitted here for simplicity. If I type 'bob', it does the correct process. This is all assuming I have a file called 'bob.txt' in the directory. Now, when I type 'asdf' or 'asdf.txt', it turns back a 'file not found' as it should. However, every reattempt to type 'bob' or 'bob.txt' returns file not found. I put in a 'cout << fileName' to see what filename is being returned and it is always correct. It's just not processing properly. Any thoughts?
I figured it out!!! I AM SO PROUD OF ME!!! Sorry for the caps sentence but I ROCK!!!
In case anyone finds this particular problem of interest, the issue was that I wasn't clearing my string. It was carrying over the previous string and not clearing it between loops. So the first time it was getting asdf.txt and the second time it was asdf.txt.bob.txt. At least, that's what I am fairly certain was happening.