约 52 个结果
在新选项卡中打开链接
  1. What's the difference between "bool" and "bool?"?

    2016年10月5日 · bool is a value type, this means that it cannot be null, so the Nullable type basically allows you to wrap value types, and being able to assign null to them. bool? can contain three …

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

    2012年1月4日 · 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 stdbool.h. Basically, …

  3. Using Boolean values in C - Stack Overflow

    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 be used.

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

    2019年12月14日 · 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 the …

  5. boolean - Why is bool 8 bits long in C++? - Stack Overflow

    2025年8月14日 · In C++, why is the bool type 8 bits long (on my system)? Only one bit is enough to hold the Boolean value. I used to believe it was for performance reasons, but then on a 32 bits or 64 bits …

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

    2008年9月25日 · 2 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 …

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

    2011年5月20日 · How do you convert a nullable bool? to bool in C#? I have tried x.Value or x.HasValue ...

  8. c# - Как работает bool? - Stack Overflow на русском

    bool asd = 1 < 2 && true; &&=логическое "и", сначала выполняется сравнение 1<2 оно возвращает значение (false=0 или true=1+) затем возвращённое значение сравнивается с true и если оба …

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

    2009年10月22日 · 439 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 expectedly …

  10. Is there any difference between && and & with bool (s)?

    2011年7月5日 · In C++, is there any difference between doing && (logical) and & (bitwise) between bool (s)? bool val1 = foo(); bool val2 = bar(); bool case1 = val1 & val2; bool case2 = val1 && val2; Are …