So, I have to deal with around 200 files analyzing them and reformatting to a useable data output. My problem is, I don't know how to open this many in a for loop. right now I have
vector <string> files [204];
as a global variable, but I know this is wrong, and to open all the files I have
It is unfortunately necessary to open all the files at once due to the analysis that needs to be run upon them (data from multiple runs separated into data types then put into ROOT).
Thank you AbstratcionAnon, I did not know that you could have a vector of istreams.
in order for the files to open and close correctly, I replaced all file1 with just file[i] and the vector used was
vector <fstream> file;
Thank you for the help, the fact that you could do a fstream vector was the piece I needed.
EDIT: Upon Running, the files do not open. Just out of curiosity, does Dev-C++ have anywhere in particular in needs input files to be stored? (UPDATE: Never mind, just a problem with the names string vector)