Im looking to create a vector that stores a list of different input streams including cin and a few text files. So far I have this.
vector<istream> inStreams;
vector<istream>::iterator streamsIterator;
streamsIterator = inStreams.begin();
streamsIterator = inStreams.insert(streamsIterator, cin); ////this has error!
for (char i = 1; argv[i] != NULL; i++) {
streamsIterator = inStreams.insert(streamsIterator, ifstream(argv[i], ifstream::in));
}
The problem is that the compiler spits out a big error that goes deep into the template library that I just cant decipher.