[Dev-C++] Input one file output another.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Mitchell, T. (DLM) <Tam...@dl...> - 2002-10-24 00:51:27
|
Rephrase question.
I am trying read test from one file and output to another file and am not
sure how to complete correctly.
#include<fstream>
#include<iostream>
using namespace std;
void main(){
ifstream fin;
ofstream fout;
fin.open("Eb.txt");
/*if(fin==0){
cout << " input file xx.txt not found "<< endl;
}*/
fout.open("y.txt");
int a[10],i;
for(i=0;i<10;i++)
fin >> a[i];
for(i=0;i<10;i++)
fout << a[i] << endl;
}
Can anyone offer any suggestions.
Tamra Y. Mitchell
Database & Operating Systems Analyst
412-222-8203 - Work
412-996-9078 - Cell
|