BOOL与bool区别
来源:互联网 发布:手机触摸屏校正软件 编辑:程序博客网 时间:2024/05/22 01:31
1、先查看定义:
BOOL是微软定义的宏,实际上是int型占4个字节,该定义位于VC目录下WINDEF.H、AFX.H,可以找到如下代码:
bool是C/C++关键字,关于MSDN2005帮助文档中,解释如下:
This keyword is a built-in type. A variable of this type can have values true and false. Conditional expressions have the type bool and so have values of type bool. For example, i!=0
now has true or false depending on the value of i
.
The values true and false have the following relationship:
When a postfix or prefix ++ operator is applied to a variable of type bool, the variable is set to true. The postfix or prefix -- operator cannot be applied to a variable of this type. The bool type participates in integral promotions. An r-value of type bool can be converted to an r-value of type int, with false becoming zero and true becoming one. As a distinct type, bool participates in overload resolution. 2、定义BOOL与bool原因(TRUE FALSE 与 true false) 在查阅很多资料后,请教了这方面朋友侦探,下面是他的解释如下:
- BOOL与bool区别
- BOOL与bool区别
- BOOL与bool区别
- BOOL与bool区别
- BOOL与bool区别
- BOOL 与bool 的区别
- BOOL与bool 的区别
- BOOL与bool的区别
- BOOL与bool的区别
- BOOL与bool的区别
- BOOL 与bool的区别
- BOOL与bool的区别
- BOOL与bool的区别
- vc中bool与BOOL的区别
- C++中BOOL 与bool的区别
- vc中bool与BOOL的区别
- BOOL与bool类型的区别
- vc中bool与BOOL的区别
- 快速抵达网站位置,其实是个百度快速搜索的.
- BI入门经典
- 被锁定帐户
- 白领高薪
- const与#define相比,优点?
- BOOL与bool区别
- 回车事件
- HTTP 错误 401.3 - 访问被资源 ACL 拒绝
- 不显示扩展名
- MySQL通用安全指南
- 不显示隐藏文件
- graphviz工具及其原理
- 查看电脑硬件信息
- 阳光牧场外挂的主要编写思路介绍