Thread: When does ios::badbit get set?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Programming Ninja In-T...
    Join Date
    May 2009
    Posts
    827

    Question When does ios::badbit get set?

    When and why does ios::badbit get set on an input or output operation on a file with an ifstream or ofstream?
    I did a little Googling to try to answer this on my own, but didn't really find anything explaining in detail when and why this happens.

    Thanks in advance.

    EDIT: Hmm...it looks like one of the reasons is hardware failure. I hope that doesn't indicate there's something wrong with my computer...
    Last edited by Programmer_P; 01-14-2011 at 11:15 PM.
    I'm an alien from another world. Planet Earth is only my vacation home, and I'm not liking it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling errors and using Cmake Set Policy
    By eligor in forum Linux Programming
    Replies: 2
    Last Post: 01-25-2010, 01:43 PM
  2. Replies: 8
    Last Post: 01-18-2008, 04:06 AM
  3. The new FAQ
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 34
    Last Post: 08-30-2006, 10:05 AM
  4. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM
  5. Set default directory with GetTempDir?
    By Bajanine in forum Windows Programming
    Replies: 2
    Last Post: 05-04-2003, 11:36 PM