I am making a program that reads a list of numbers from one file and prints them to another file and so far I have this : #include <fstream.h>
int main ()
{
//int count =0;
ifstream fsin;
ofstream fsout;
fsin.open("parts.cpp");
fsout.open("total.dat");
if (!fsin )
{
cerr << "Error opening parts file" << endl;
}
while(!fsin.open("parts.cpp").eof)
//count += 1;
fsin.close();
fsout.close();
return 0;
}
How do I get the data from the data.cpp file to show up in the total.dat file? and get it to print in columns?
int main ()
{
//int count =0;
ifstream fsin;
ofstream fsout;
fsin.open("parts.cpp");
fsout.open("total.dat");
if (!fsin )
{
cerr << "Error opening parts file" << endl;
}
while(!fsin.open("parts.cpp").eof)
//count += 1;
fsin.close();
fsout.close();
return 0;
}
How do I get the data from the data.cpp file to show up in the total.dat file? and get it to print in columns?