void main ()
{
int a,b,c,i;
ifstream input_data[2]={input_data[0],input_data[1]};
input_data[0].open("input.txt0", ios::in);
input_data[1].open("input.txt1", ios::in);
for (i=0; i<2 ; i++){
if (input_data[i].fail()){
cerr << "Can't open input file "<<endl;
exit(-1);
}
while(!input_data[i].eof())
input_data[i] >> a >> b >> c;
cout << a << b << c << endl;
input_data[i].close();
}
_getch();
}
Is it like this?Thank you for you reply.