help with C++ boolean

Questions about programming languages and debugging
Post Reply
electro-technic
forum buddy
forum buddy
Posts: 15
Joined: 08 Mar 2010, 17:00
14
Location: Calgary, Alberta, Canada
Contact:

help with C++ boolean

Post by electro-technic »

Hello, I'm practicing C++ as a hobby. I find it complicated and mentally stimulating and I very well enjoy the challenge but I think that I left an important part of it behind because I cant seem to find anything that explains it enough and that is the use of the boolean. I was just inquiring to the forum about any tips or help in finding something that goes into some detail about them and how to use them. Any help will be appreciated.

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

The boolean data type is very simple, since it only has two values (true and false).

You can read more about the data type here

Code: Select all

http://en.wikipedia.org/wiki/Boolean_data_type
And here

Code: Select all

http://www.functionx.com/cpp/keywords/bool.htm
"The best place to hide a tree, is in a forest"

electro-technic
forum buddy
forum buddy
Posts: 15
Joined: 08 Mar 2010, 17:00
14
Location: Calgary, Alberta, Canada
Contact:

Post by electro-technic »

thank you so much, I knew it was simple and I just did up a quick test/example for myself and it worked fine and I do see how they can be very usefull. I knew the values were either true or false but I was clueless about the syntax or how to have the program check or change it's value and act upon what the value is when it does check. But thanx again.

Post Reply