编译提示: warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
来源:互联网 发布:javascript 预编译 编辑:程序博客网 时间:2024/05/01 05:39
解决办法:
把bool改成大写的BOOL后就没有警告的提示了
原因:BOOL型在windef.h头文件中被定义,其实际类型为int,换句话说,BOOL其实就是int型变量,与布尔型bool没有什么关系。
- 编译提示: warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- warning C4800: 'VARIANT_BOOL' : forcing value to bool 'true' or 'false' (performance warning)
- BOOL, bool, warning C4800
- warning C4800: “BOOL”: 将值强制为布尔值“true”或“false”(性能警告)
- warning C4800: “BOOL”: 将值强制为布尔值“true”或“false”(性能警告)
- warning C4800: “int”: 将值强制为布尔值“true”或“false”(性能警告)
- BOOL,TRUE,FALSE 和 bool ,true, false
- 使用GCC4.8 编译android内核提示warning: argument to ‘sizeof’ in ‘void* memset(void*, int, size_t)’
- bool true false
- comparison is always true due to limited range of data type 编译warning
- BOOL与bool TRUE与true FALSE与false 区别
- true or false
- js bool true false 真假比较
- js bool true false 真假比较
- 很多C编译不支持bool型,导致出现false和true未定义
- Linux 内核剖析
- linux+httpd+svn搭建
- hdu4389-X mod f(x)-多校9-1010题解
- 清理应用程序缓存
- ActionContextCleanUp
- 编译提示: warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
- js验证表单大全
- 做Java开发这一年
- 线段树 HDU 3874 necklace
- CRichEditCtrl GetLine 中文
- AJAX异步更改数据库
- Matrix大牛讲KMP算法
- error LNK2005
- 从西潮到东风:我在世行4年对世界重大经济问题的思考和见解