Subj : Re: fstream arrays To : borland.public.cpp.borlandcpp From : " Bruce Salzman" Date : Wed Feb 25 2004 03:07 pm > the file open is called only once for any given item of the array (which is > when the " if (!out_files[file]) error is declared), the data is written at > the end of the program (successfully), and the files are closed sucessfully. Not sure what the error is. Have you examined ios::state to see which bits are set? > The program works without any error at all when I do NOT declare the fstream > variable to be an array and when I do open the fstream as array items it > does actually open a file even though it claims to be returning a 0 when > checked. What returns 0? get_subj_fp() returns 0 on success. open() doesn't return anything. > I have lived with this for some years but am now having a similar > enough problem in the GUI domain that I need to understand how arrays of > stream pointers differ from streams. Your code doesn't have arrays of stream pointers. You declare an array of stream objects. Regards, Bruce .