X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/6441a11e7c0fe2ab5bad813770474858302a88dd..4d4c1c97b3e05fc15c7ebac8d5237ad1b8844230:/writeout.cpp 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++; }