Is it possible to have multiple input streams open at the same time?

I know it takes a lot of time to open a file, and I am trying to be as efficient as possible. I really need to have two streams open at the same time. The data is too large to save to a temporary structure.

If I open stream A, then open stream B, are both streams open? Or does stream A close when I open stream B?

If they are both open, how can I differentiate between the two? For example,

fin >> x;   //does this read from stream B?
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.