About 11,500,000 results
Open links in new tab
  1. What's the difference between "bool" and "bool?"?

    Oct 5, 2016 · Since bool is a value type (just as int, long, double, DateTime and some other types), it will always be initialized to a default value (false in the case of a bool, 0 in the case of …

  2. Difference between _Bool and bool types in C? - Stack Overflow

    Jan 4, 2012 · Since bool wasn't reserved prior to C99, they use the _Bool keyword (which was reserved). bool is an alias for _Bool if you include stdbool.h . Basically, including the stdbool.h …

  3. Using Boolean values in C - Stack Overflow

    Jun 15, 2023 · bool and _Bool, and true and false are language keywords for boolean types. bool/_Bool is a type that can hold either the value true or false. Logical operators!, ||, and && …

  4. c++ - _Bool and bool: How do I solve the problem of a C library …

    Aug 20, 2010 · This shows that the programmer probably have to use the "intended" word bool in his/her projects. It is the most logical word to declare a boolean type in a program. In some …

  5. What is the difference between bool and Boolean types in C#

    Sep 25, 2008 · bool is a primitive type, meaning that the value (true/false in this case) is stored directly in the variable. Boolean is an object. A variable of type Boolean stores a reference to a …

  6. What is the difference between BOOL and bool? - Stack Overflow

    Dec 14, 2019 · The values for a bool are true and false, whereas for BOOL you can use any int value, though TRUE and FALSE macros are defined in the windef.h header. This means that …

  7. boolean - What is bool in C++? - Stack Overflow

    Aug 4, 2013 · bool is a fundamental type; true and false are the only two values that an object of type bool that has been initialized can have. Your function boolPtrHere() does not take a …

  8. How do I correctly use a bool with an if statement?

    Feb 14, 2017 · IsChecked is a nullable bool, it can be true, false or null. The ==True is needed so that you are left with a "predicate" that can be resolved as either true or false. if ischecked is …

  9. in C# what does 'bool = bool != true' mean? - Stack Overflow

    Mar 7, 2012 · But if p.Enabled is a nullable bool, it will map null and false to true, and map true to false. But I'd prefer writing p.Enabled = !(p.Enabled ?? true) in that case. If p.Enabled is a …

  10. Using bitwise operators for Booleans in C++ - Stack Overflow

    Aug 24, 2008 · BOOL two = 2; BOOL one = 1; BOOL and = two & one; //and = 0 BOOL cand = two && one; //cand = 1 In C++, however, the bool type is guaranteed to be only either a true or …

Refresh