So when it prompts for "enter name of the output file", it just skips over that line and moves right into the fout.open(sname) line? Or does the program hang?
|
I guess it would help if i said that i initialized
istream fin;
ostream fout; (but you probably figured that out)
all i see are the cout statements and get no chance to input, so im guessing it is just going right into the fout.open line.
You could try flushing the input before reading by issuing cin.flush(). |
what library is cin.flush() found in?
I currently have cstring library, iostream, and fstream.
and using namespace std;
if you need more code to understand or want me to explain something just let me know.
and thanks for the help.