Quote Originally Posted by dukevn
By the way, what is difference between fout.flush(); and fout.close();?
One forces output to be written, the other forces output to be written and then closes the output stream.