3fa Subj : Re: fstream arrays To : borland.public.cpp.borlandcpp From : " Bruce Salzman" Date : Wed Feb 25 2004 12:09 pm > In the work I do I must have fstreams that are arrays (there are many > reasons for this.... I have to access the fstream I need at any particular > time with a mathematical formula). On error checking of the opening of > these streams I get errors. When I ignore the error messages the files > actually function just fine (data is written out to them without error). Your code seems to work fine for me (after getting it to compile ;). (I created a new 32-bit console project for testing.) You create an array of default constructed fstreams which have global scope. Then they are attached to some files when get_subj_fp calls open. So far, so good. These streams will then remain open until your program exits. If you call get_subj_fp again for one of these files, you'll get an error. Or do you close the streams somewhere else? Regards, Bruce . 0