I've written a program like the follow:
int main ()
{
.
.
.
.
ifstream file1;
ifstream file2;
ofstream simiralities;
simiralities.open("P(0)_P(1).txt", ios::app);
file1.open("test1.txt", ios::in);
while (!file1.eof())
{
.
.
.
file2.open("test2.txt", ios::in);
while (!file2.eof())
{
.
.
.
.
}
file2.close();
}
simiralities<<number;
file1.close();
simiralities.close();
return 0;
}
the inner loop just works for the first time. from the scond time in outer loop, I can't inter the inner loop. I gusse there migth be a problem with file.close().