Problem reading text file

So the program is working fine except for this small problem. When i run the main loop the first time it works fine, but when I input a valid filename the second time it tells me it isn't valid. I even tried using the same text file that I deciphered the first time in loop but it says its not valid. I made sure the filename was clear before cin. Please help (I think the problem is in my FileReader function)

Last edited on
a) you can just make it like this on line 159:
[code]alphaArray alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

b) dont use using namespace std;

c) dont use inputfile.clear(). instead use close();
Topic archived. No new replies allowed.