Search:

Type: Posts; User: hk_mp5kpdw

Search: Search took 0.04 seconds.

  1. This: while (!infile.fail() &&...

    This:


    while (!infile.fail() && !infile.eof())
    {
    infile>>number;

    ... is wrong. You need to test the read operation for success and continue if things are OK. You should avoid using...
  2. I thought you were supposed to only use one while...

    I thought you were supposed to only use one while loop, you've got several there.

    The reason you are only seeing the even numbers is that the first loop runs through until it reaches the end of...
Results 1 to 2 of 2