#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. 你误解 .net 了吗?

    我现在发现很多人对C#还存在很大的误解,例如C#是完全封闭的,C#不能跨平台,C#性能很差,C#不支持指针等等,持以上观点的人非常多,甚至最近看到的国内某机构对开发语言的统计中还写着C#不跨平台,不开 ...

  2. versionCompare 版本号比较工具

    简介 需求非常简单,需要比较软件或app的版本号,判断大小,形如 0.10.2形式的版本号字符串.实现逻辑是按照点(.)分割字符串,然后逐级比较版本大小.不存在的按0处理,空字符串小于非空字符串. 测 ...

  3. nios II--实验2——led软件部分

    软件开发 首先,在硬件工程文件夹里面新建一个software的文件夹用于放置软件部分:打开toolsàNios II 11.0 Software Build Tools for Eclipse,需要进 ...

  4. kmp模板,线性完成pos

    var p:..] of longint; i,j:longint; a,b:ansistring; begin readln(a); readln(b); P[]:=; j:=; to length ...

  5. 分布式拒绝服务攻击 DDoS

    分布式拒绝服务(DDoS:Distributed Denial of Service)攻击指借助于客户/服务器技术,将多个计算机联合起来作为攻击平台,对一个或多个目标发动DDoS攻击,从而成倍地提高拒 ...

  6. IE6下margin时,float浮动产生双倍边距

    今天遇到了一个IE6下的兼容性问题,虽然IE6已经不被大众所期待了,用户也已基本上消失的所剩无几,但是,作为一个问题而存在,我们有必要尝试的去研究一下bug的改善方法 对元素float-left,然后 ...

  7. org.apache.commons.lang3.ArrayUtils 学习笔记

    package com.nihaorz.model; /** * @作者 王睿 * @时间 2016-5-17 上午10:05:17 * */ public class Person { privat ...

  8. CSS3动画属性之Animation

    首先定义一个动画规则: @keyframes mymove { from {top:0px;} to {top:200px;} } @-moz-keyframes mymove /* Firefox ...

  9. 02python算法-递推

    递推 1什么是递推?:根据已有节点的值,以及规律推出之后节点的值 2为什么要用递推:简单的解决有规矩事件 3怎么用?: 我们举个经典的例子: 如果1对兔子每月能生1对小兔子,而每对小兔在它出生后的第3 ...

  10. js-jquery-将table的td转化成可编辑的文本

    1.使用插件mindmup-editabletable.js $('#table').editableTableWidget({editor: $('<textarea>')}); 2.j ...