Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9014413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:30:04+00:00 2026-06-16T03:30:04+00:00

Hmm my loop skips every other line, I’m comparing this 5 15 16 17…

  • 0

Hmm my loop skips every other line, I’m comparing this 5 15 16 17… to this 17 37 5… and trying to find when the numbers match. And I’m not sure why it’s skipping a line.

for(int j=0;j<fileMaxLines;j++){

        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++;

      }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:30:06+00:00Added an answer on June 16, 2026 at 3:30 am

    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
    
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hmm not sure if the title of this makes any sense. I'm creating a
Hmm this is strange. It works in IE but not FF. Please take a
Hmm ... not sure why, but adsense ads aren't showing up on this site
Hmm.. I am not sure how to describe this. But I will try So
hmm, I feel my OP title sounds wrong, but I am not sure how
its when i starting trying implementing this that i got quite stuck. some business
Hmm.. thats realy different problem I fetch $links from db linke this $links =
Hmm... i'm trying to use a php variable in jquery, in my edit.php :
Hmm...this question may sounds silly , hope you all don't mind... If I have
Hmm i tried to downlaod data from myurl/test.txt i find how to do that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.