Thread: Terms

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    35

    Terms

    This is the thread I'm going to be asking about terms in C++... My first one:

    Whats a BOOL (or a bool in openGL)?

  2. #2
    Registered User Esss's Avatar
    Join Date
    Aug 2001
    Posts
    133
    > Whats a BOOL

    If you look through your header files, you will find

    #define BOOL int

    which should answer your question.

    > (or a bool in openGL)?

    'bool' is a standard C/C++ type, not an OpenGL type. It is a one-byte-long value, which can take either the value 'true' or 'false'.
    Ess
    Like a rat in a maze who says,
    "Watch me choose my own direction"
    Are you under the illusion
    The path is winding your way?
    - Rush

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    35
    Thanks, that kind of answers it.

  4. #4
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    I'm not 100% sure but I do think that bool is only standard in ansi c++ not c. Windows also defines bool's too.

  5. #5
    Frustrated Programmer :( phantom's Avatar
    Join Date
    Sep 2001
    Posts
    163
    If you are going to do a thread on C++ then use the C++ programming board.
    Don't mean to be picky but in C++ bool is either TRUE or FALSE ( notice the uppercaps).

    Again, don't mean to be rude or picky.
    My site to register for all my other websites!
    'Clifton Bazaar'

  6. #6
    Registered User
    Join Date
    Sep 2001
    Posts
    412
    Originally posted by phantom
    If you are going to do a thread on C++ then use the C++ programming board.
    Don't mean to be picky but in C++ bool is either TRUE or FALSE ( notice the uppercaps).

    Again, don't mean to be rude or picky.
    I think you mean, in C++ BOOL is either TRUE or FALSE. By contrast, bool, the primitive type, can take on the values specified by the keywords true or false. There is a difference -- BOOL is an int, which takes on the integer values TRUE or FALSE. bool is a primitive, which takes on the values true or false, which are also keywords.

    bool, true, and false are keywords which are only defined under C++, BOOL, TRUE, and FALSE may be used in C.

  7. #7
    Registered User
    Join Date
    Aug 2001
    Posts
    411
    right V

    bool, true, false are keywords

    and BOOL, TRUE, FALSE are defined in headers.

  8. #8
    Frustrated Programmer :( phantom's Avatar
    Join Date
    Sep 2001
    Posts
    163
    Ooooops........ Sorry about that, V is right. BOOl is either TRUE or FALSE.
    My site to register for all my other websites!
    'Clifton Bazaar'

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Malloc & Calloc difference in terms of memory allocated
    By swapnaoe in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 12:57 AM
  2. Terms used in C
    By lido in forum C Programming
    Replies: 12
    Last Post: 07-25-2003, 02:24 PM
  3. how many terms
    By rams in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:10 AM
  4. Food Terms
    By Yoshi in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 12-01-2001, 06:59 PM
  5. C++ terms Questions
    By DramaKing in forum C++ Programming
    Replies: 8
    Last Post: 11-12-2001, 11:13 PM