Could something like this be done in a the same program. Im trying to figure out why I cannot open a file I just wrote to. If it cannot be done then problem found. Or is this a big NO NO?
Code:
inData.open("qwert.dat");
outData.open("asdfg.dat");

/////////////////
Do some stuff
/////////////////

inData.close();
outData.close();

inData.open("asdfg.dat");        //open the file I just wrote and closed

/////////////////
Do some stuff
/////////////////

inData.close();                         //close the file again

/////////////////
Do some stuff
/////////////////

outData.open("asdfg.dat");     //doing this blanks the file

/////////////////
Do some stuff
/////////////////

outData.close();