Alright, so I've got a Merge Sort program working that accepts a text file, and is supposed to split the data from that one text file, into TWO different text files. This is however, just putting them into one =x Any idea as to why?
here's part of my code:
while ( !fin.eof() )
{
if ( !fin.eof() )
{
do
{
curr = next;
fin >> next;
fout1 << curr << endl;
}
while ( !fin.eof() && (curr <= next) );
}
if ( !fin.eof() )
{
do
{
curr = next;
fin >> next;
fout2 << curr << endl;
}
while ( !fin.eof() && (curr <= next ) );
}
}