Thread: Bool values

  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    48

    Bool values

    I know that bool values are only supposed to be able to be 0 or 1, but what could cause one to get the value of 24, and what does that even mean?

  2. #2
    Registered User Boomba's Avatar
    Join Date
    Jun 2003
    Posts
    89
    I think in C/C++ doesnt matter what the value of the boolean is...its more like 0 is false, and true is anything else (not just 1). thats why its nice to be able to say 'true' and 'false' rather than hardcode the value.

    so to sorta answer your question 24 would be 'true'.

    hope that helped,
    Boomba,

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    48
    Alright, thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversion From C++ To C
    By dicon in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 02:54 PM
  2. Replies: 5
    Last Post: 06-10-2007, 05:54 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. DirectInput help
    By Muphin in forum Game Programming
    Replies: 2
    Last Post: 09-10-2005, 11:52 AM
  5. Can someone help me with this console app please?
    By Marcos in forum C++ Programming
    Replies: 4
    Last Post: 07-26-2003, 07:04 PM