Alright so I am trying to swap fstreams. I do not use c++11 so there is no swap function. Is there anyway I can swap the files 2 fstreams have open? Or is there a way to get the name of the file that the fstream has open?
And in all reality I will be working with more than two files because I am working on an external polyphase sort
Okay, you're making it too complicated. You'll already have a collection of stream objects for a polyphase sort, so just mark the index of (or have a reference to) the current output stream and update it as necessary. That's so much more intuitive than swapping streams left and right, even if you were using C++11.