// filetest-sequential.cpp #include #include #include const int LINESIZE=256; using namespace std; main(){ ifstream inF; ofstream outF; int temp; char c[LINESIZE+1]; inF.open("input.txt"); if (inF.fail()){ cerr << "Error opening input.txt" << endl; exit(1); } outF.open("output.txt"); if (outF.fail()){ cerr << "Error opening output.txt" << endl; exit(1); } //while( inF >> temp ){ // cout << temp << endl; // outF << temp << endl; //} int linenum = 1; while( inF.getline(c, LINESIZE) ){ outF << linenum << " " << c << endl; linenum++; } }