Is it possible to close just the name portion of an input stream and not the stream itself
sample code
int main()
{
ifstream baseline;
ifstream input;
ofstream output;
baseline.open("sel000.xls",ios::in); //open baseline file
output.open("output.dat",ios:ut); //open output file
i = 0;
for(int k = 1; k <=2;k++)
{
//do some stuff
input.open(infile,ios::in); //open input file
i = 0;
while(input >> time >> first)
{
//do some stuff change and chang the name of infile
}
input.close();//instead of closing input is it possible to close just infile so that the loop will work
}
yes I know you can move ifstream input; into the loop but I do not want to make it a local varaible



LinkBack URL
About LinkBacks
ut); //open output file



