For example, I want to
0. In
1. In
2.
in3. In
4. In
The five file read and write
Generally use the
Ifstream cin (" 0. In ");
Ofstream cout (" 0. Out ");
Have rewritten five times, you can write a for can continue to finish for the five documents to read and write?
CodePudding user response:
for(int i=0; i<=4; I++)
{
Ifstream cin (String (I) + ". In ") ';
Ofstream cout (String (I) + "out");
}