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

    Oct 5, 2016 · 63 I use the "bool" type for variables as I was used to in C++, and I try to put the values of functions or properties I expect to be boolean into my variable. However I often …

  2. 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 && can …

  3. python - Truth value of a Series is ambiguous. Use a.empty, a.bool ...

    Just to add some more explanation to this statement: The exception is thrown when you want to get the bool of a pandas.Series: >>> import pandas as pd >>> x = pd.Series([1]) >>> bool(x) …

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

    Jan 4, 2012 · These data types were added in C99. 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 …

  5. c# - Convert nullable bool? to bool - Stack Overflow

    May 20, 2011 · How do you convert a nullable bool? to bool in C#? I have tried x.Value or x.HasValue ...

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

    Aug 24, 2008 · Using bitwise operations for bool helps save unnecessary branch prediction logic by the processor, resulting from a 'cmp' instruction brought in by logical operations.

  7. gcc - Is bool a native C type? - Stack Overflow

    Oct 22, 2009 · 433 bool exists in the current C - C99, but not in C89/90. In C99 the native type is actually called _Bool, while bool is a standard library macro defined in stdbool.h (which …

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

    Dec 14, 2019 · 46 In VC++ we have the data type “BOOL” which can assume the value TRUE or FALSE, and we have the data type “bool”, which can assume the value true or false. What is …

  9. What is the printf format specifier for bool? - Stack Overflow

    There is no format specifier for bool types. However, since any integral type shorter than int is promoted to int when passed down to printf() 's variadic arguments, you can use %d:

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

    Aug 4, 2013 · Bool is a well-defined primitive integral type, just like int, char, etc. It also has mathematical conversions to other integral types, which can sometimes be confusing for …