Link to home
Start Free TrialLog in
Avatar of jschmuff
jschmuffFlag for United States of America

asked on

I can only see 5 words in my list..

I can only see 5 words in my list file. Is there something wrong with the code?

void Game::listWords()
{
      Game myGame;
      myGame.loadFile();

      cout << "\tThe following words in the file are: \n" << endl;

      for(int Loop = 0; Loop < Count - 1; Loop++)
      {
            cout << "\t" << Words[Loop] << "\n";
            if (++Loop > Count)
                  break;
            cout << "\t" << Words[Loop] << "\n";
            if (++Loop > Count)
                  break;
            cout << "\t" << Words[Loop] << "\n";
            if (++Loop > Count)
                  break;
            cout << "\t" << Words[Loop] << "\n";
            if (++Loop > Count)
                  break;
            cout << "\t" << Words[Loop] << "\n";
      }
}

ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jschmuff

ASKER

perfect answer you are awesome.