Thread: Condition question

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    65

    Condition question

    Is
    Code:
    while(cin)
    the same as
    Code:
    while(!cin.eof())
    ?

  2. #2
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,794
    no

    cin can be in a fail state due to error even when eof not riched yet
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fmod question
    By spadez in forum C Programming
    Replies: 2
    Last Post: 04-17-2009, 05:26 PM
  2. while condition question..
    By transgalactic2 in forum C Programming
    Replies: 3
    Last Post: 04-04-2009, 04:49 PM
  3. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 12:14 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM