Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. A Stupid doubt????

A Stupid doubt????

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ilamparithi
    wrote on last edited by
    #1

    Hi, What is the difference between BOOL and bool?? Best Regards, A.Ilamparithi

    J R M 3 Replies Last reply
    0
    • I Ilamparithi

      Hi, What is the difference between BOOL and bool?? Best Regards, A.Ilamparithi

      J Offline
      J Offline
      jmkhael
      wrote on last edited by
      #2

      This topic is already discussed. Quick info: BOOL is a int ( integer value from 0 to 65535 ) bool is a boolean ( true false ) but BOOL can be used as bool ( BOOL bBoolean = TRUE or BOOL bBoolean = FALSE ) Papa while (TRUE) Papa.WillLove ( Bebe ) ;

      1 Reply Last reply
      0
      • I Ilamparithi

        Hi, What is the difference between BOOL and bool?? Best Regards, A.Ilamparithi

        R Offline
        R Offline
        RChin
        wrote on last edited by
        #3

        BOOL goes back to the days when bool was not part of the C++ standard. It is typedef'ed as an int, where FALSE is 0. bool, however is inherently c++. Although BOOL and bool may be used interchangeably, you should be very aware of the dangers involved in mixing these two types. There were a few discussions about this on the lounge a while ago I think. There may be an FAQ article about this as well. Have a search on it. It is worth knowing.


        I Dream of Absolute Zero

        1 Reply Last reply
        0
        • I Ilamparithi

          Hi, What is the difference between BOOL and bool?? Best Regards, A.Ilamparithi

          M Offline
          M Offline
          Michael Pauli
          wrote on last edited by
          #4

          If I remember it corectly it's: "enum and #define" - bool is a enum and the classic BOOL is #define'd Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups