For your own sanity (and that of others reading it), please indent your code, e.g.:
void functionName (type1 arg1, ...)
{
some statements;
while (condition) {
more statements;
}
}
Also, when your problem is simply that your code isn't opening the specified file, don't post 200 extra lines of irrelevant functions. Trim the source down to what demonstrates the problem, and post just that.
That said, I don't see anything obvious wrong with your code. Is the filename printed out correctly and completely in your else-block? In particular, if there is any white-space in your path, cin >> ... is going to break at that point, instead use getline(cin, fileName); .
Also, just because the file didn't open correctly doesn't mean the file wasn't found. What are you typing in for your filename? What is the error message printing back out?
raptr_dflo
Practically a Master Poster
602 posts since Aug 2010
Reputation Points: 76
Solved Threads: 82