Hi friends,
I wrote a simple code to write in different files but I don't know where I made mistake. The function is writing the first file and after writing everything in the second file, not in the next files 3,4, 5. Can anyone help me please?
Thanks a lot!
int main()
{
//...
file1.open(name01Char);
file1SECOND.open(name01SECONDChar );
compare_Space(01,01SECOND, LOGFULL1, tokensA_1);
01.close();
01SECOND.close();
01.open(name01Char);
01SECOND.open(name01SECONDChar );
compare_SpaceRed(01,01SECOND, LOGPARTIAL1 , tokensB_1);
01.close();
01SECOND.close();
LOGPARTIAL1.close();
LOGFULL1.close();
// ---------------------------------------------------------
file2.open(name02Char);
file2SECOND.open(name02SECONDChar );
compare_Space(02,02SECOND, LOGFULL2, tokensA_2);
02.close();
02SECOND.close();
02.open(name02Char);
02SECOND.open(name02SECONDChar );
compare_SpaceRed(02,02SECOND, LOGPARTIAL2 , tokensB_2);
02.close();
02SECOND.close();
LOGPARTIAL2.close();
LOGFULL2.close();
// ...
// The same for 3,4 and 5
// ...
return 0;
}
void compare_Space(ifstream &Firstfile, ifstream &SecondFile, ofstream &LOG_log, vector <string> &tokens)
{
// ...
LOG_log << "DEBUG PRINT" << endl;
// ...
}