#pragma warning( disable : 4800 ) // forcing bool 'true' or 'false' ,忽略4800 警告
#pragma warning( disable : 4786 ) // truncating debug information to 255 chars  忽略4786 警告

 
'type' : forcing value to bool 'true' or 'false' (performance warning)

This warning is generated when a value that is not bool is assigned or coerced into type bool. Typically, this message is caused by assigning int variables tobool variables where the int variable contains only values true and false, and could be redeclared as type bool. If you cannot rewrite the expression to use typebool, then you can add "!=0" to the expression, which gives the expression type bool. Casting the expression to type bool will not disable the warning, which is by design.

The following sample generates C4800:

// C4800.cpp
// compile with: /W3
int main() {
int i = 0; // try..
// bool i = 0; bool j = i; // C4800
j++;
}

Compiler Warning (level 3) C4800的更多相关文章

  1. Compiler Warning (level 2) CS0436

    https://docs.microsoft.com/en-us/dotnet/csharp/misc/cs0436 // CS0436_a.cs // compile with: /target:l ...

  2. Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead的解决办法

    今天在导入工程进Eclipse的时候竟然出错了,控制台输出的是: [2013-02-04 22:17:13 - takepicture] Android requires compiler compl ...

  3. Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Android Tools>Fix project Properties.

    重装操作系统之后,或者破坏了Android的开发环境之后,需要重新配置好Android的开发环境.但是配置好后,导入原有的项目时,报错: Android requires compiler compl ...

  4. Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead

    Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead 在解决问题Underscores can only ...

  5. Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tool

    重装操作系统后,要重新配置Android开发环境.配置成功后,添加原本项目时却出现了错误! Android requires compiler compliance level 5.0 or 6.0. ...

  6. Eclipse编译Android项目时出现的问题:Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead.

    Consle: Android requires compiler compliance level 5.0 or 6.0. Found '1.8' instead. Please use Andro ...

  7. Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead.解决方法

    今天在eclipse里报这个错误: Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please ...

  8. Eclipse工程中Java Build Path中的JDK版本和Java Compiler Compiler compliance level的区别(转)

    在这里记录一下在eclipse中比较容易搞混淆和设置错误的地方.如下图所示的功能: 最精准的解释如下: Build Path是运行时环境  Compiler是编译时环境  假设,你的代码用到泛型,Bu ...

  9. Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead的解决的方法

    今天在eclipse里报这个错误:   Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Plea ...

随机推荐

  1. 谈谈数据监听observable的实现

    一.概述 数据监听实现上就是当数据变化时会通知我们的监听器去更新所有的订阅处理,如: var vm = new Observer({a:{b:{x:1,y:2}}}); vm.watch('a.b.x ...

  2. 用H5+Boostrap做简单的音乐播放器

    前言:这个是综合一下我最近在学的东西做的小Demo,到实际使用还有距离,但是用来练手巩固知识点还是不错的,最近在二刷JS书和Boostrap.css的源码,做完这个Demo也算是暂告一段落,接下来是j ...

  3. 基于DDD的.NET开发框架 - ABP启动配置

    返回ABP系列 ABP是“ASP.NET Boilerplate Project (ASP.NET样板项目)”的简称. ASP.NET Boilerplate是一个用最佳实践和流行技术开发现代WEB应 ...

  4. Python面试题 —— 计算列表中出现最多次的字符

    给你一个其中包含不同的英文字母和标点符号的文本,你要找到其中出现最多的字母,返回的字母必须是小写形式, 当检查最想要的字母时,不区分大小写,所以在你的搜索中 "A" == &quo ...

  5. Bootstrap中glyphicons-halflings-regular.woff字体报404错notfound

    今天查看网站的源代码,发现有个glyphicons-halflings-regular.woff文件没有找到,因为我的网站使用了bootstrap的Glyphicons 字体图标,因此需要加载Glyp ...

  6. 拼接sql是陷阱

    项目临时新增一个功能,此时我们习惯自己拼接一个sql. 更可怕的是,后期用户要求新增查询条件,甚至有上10个查询条件,这时的拼接更头疼,if append append(" status=@ ...

  7. Android下常见动画

    摘要:Android中常见的的动画有三种:属性动画.补间动画.帧动画. 注.因为前两种内容较多,后补 一.属性动画 二.补间动画 三.帧动画:本质是将一些连贯的图片加载形成连贯的动画效果 1.在Dra ...

  8. T3 任职定级面试准备

    山东大学计算机专业本科毕业,工作8年,以前在华为工作,来YY正好1年. 个人心态开放积极,对未知事物好奇心很强,前沿科学.古老宗教皆有涉猎.英语口语能力较强,能和老外流程的交流.技术涉猎广泛,喜好研究 ...

  9. 解决Eclipse项目图标上的红色感叹号,红叉

    从外部导入了几个jar包发现工程上出现红叉,但展开又没有详细的指明任何错误,可能过如下几步: 1.检查Build Path中的各个依赖jar及library是否有warning的标志,若有,处理之:  ...

  10. PHP中CURL方法curl_setopt()函数的参数

    PHP CURL curl_setopt 参数 bool curl_setopt (int ch, string option, mixed value)curl_setopt()函数将为一个CURL ...