Posted on 2002-07-25
Hi all, hopefully a nice easy one.
My program has 6 input files, each of which is loaded a line at a time, the data in each is processed and output to a different file until the end of all the input files is reached.
How and what it does isn't really important, however at the minute I have the following:
fin0.getline(line, 500, '\n');
fin5.getline(line, 500, '\n');
What I'd like to do is something like the following (0 is used seperately):
for (i=1; i<6; i++)
fin[i] = ifstream(m_file_paths[i]);
and then get data using something like:
fin.getline(line, 500, '\n');
The declarations seem to work ok, however it falls over on the getline (which works when they're not in arrays) with the standard "unable to read memory at" error dialogue...
Any ideas where I'm going wrong?
Thanks in advance,