Loading file

This is a discussion on Loading file within the C++ Programming forums, part of the General Programming Boards category; Hi!
I was wondering why my code works in some cases and not in others. This code is part of ...

Loading file

Hi!

I was wondering why my code works in some cases and not in others. This code is part of a function call that loads information into a vector, then it goes back to a menu. I'm trying to check to see if the filename entered is valid. If I enter a valid filename the first time around, everything works fine. But if I enter an invalid filename, I'm brought back to the menu, and then when I go into the load function again, even if I enter a valid file name it tells me that it is not valid. I don't understand why...