Ok, so I have the following code, heres the problem. The program involves if/ else if statements, and I need the program to be able to display the help.txt when the user decides to take that route. For some reason, when I do 'h' it is displayed the first time, then if i try the very next time to do 'h' it takes me back to the menu and nothing is displayed. It looks right to me, what am I missing? (i just put the important parts of the program here)
Code:string file= "help.txt"; string line; ifstream help; if (choice =='h') {//Open choice ==h help.open (file.c_str()); while (getline(help, line)) cout << line << endl; help.close (); }//End choice ==h