Heres the question and luckily for you it's most likely a easy one, however, i must know, is it possible to use one variable such as
ifstream myfile;
to be a different file at different time during the program? such as,
ifstream myfile;
string filename = (initial value);
for(;;) {
myfile.open(filename);
if(test for file open or not etc);
cin >> (some value);
filename = (whatever was input)
myfile.close();
}
edit --
how do you turn off graphic smilies?