// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
#include <fstream>
#include <string>

using namespace std;

int main()
{
    ifstream f1("f1.dat");
    ofstream f2("f2std.dat");
    string line;
    while(f1 && getline(f1,line))
    {
        f2 << line << endl;
    }
    f1.close();
    f2.close();
    return 0;
}
