You're increasing j
twice:
for(int j=0;j<fileMaxLines;j++){ // here
for(int k=0;k<fileMaxLines;k++){
//cout <<" " <<EInfo[j].idSE <<endl;
if(EInfo[j].idSE == ETran[k].idIV){
temphours = ETran[k].numbOfHoursIV;
cout <<EInfo[j].idSE << " -->" << ETran[k].idIV;
cout << "right"<<endl;
k=fileMaxLines;
break;
}
else{
//cout <<EInfo[j].idSE << " -->" << ETran[k].idIV << endl;
}
cout <<EInfo[j].idSE << " -->" << ETran[k].idIV << endl;
}
EInfo[j].numbOfHoursSE = temphours;
j++; // and here
}