From: Alex Schmidt Date: Mon, 9 Jul 2012 15:21:38 +0000 (+0200) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/4d4c1c97b3e05fc15c7ebac8d5237ad1b8844230?ds=inline ... --- diff --git a/writeout.cpp b/writeout.cpp index 4fb68e1..eb14309 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -55,14 +55,13 @@ writeout::~writeout() cerr << "collecting " << nextfile << endl; ifstream myfile( (fulldir + "/" + nextfile).c_str() ); - while(myfile.good()){ + while(true){ string line; getline(myfile, line); - of << line << flush; + if( !myfile.good() ) break; + of << line << endl << flush; } myfile.close(); - of << endl << flush; - remove( (fulldir + "/" + nextfile).c_str() ); jobsdone++; }