VS 中的一个BUG?求大神帮我解答下。

首先,希望知道这个问题的人能够帮我解答下。

来看代码:

int main()
{

    long long int result=-321;
    cout<<result<<endl;

    if(INT_MIN==-2147483648)
        cout<<"相等"<<endl;

    if( result<-2147483648)
     cout<<"1"<<endl;

    if( result<INT_MIN)
     cout<<"2"<<endl;

    system("pause");
}

代码很简单,就是一个比较,那么来看一下结果吧。

输出了1,对你没有看错,说明(result<-2147483648)为true。再来看INT_MIN的定义#define INT_MIN (-2147483647 - 1)

没有错就是-2147483648。来看看程序运行中是怎么样子的,

看到这里可以肯定(result<-2147483648)为真值,这到底怎么回事?

时间: 2024-08-27 20:57:05

VS 中的一个BUG?求大神帮我解答下。的相关文章

求大神帮我解决下webuploader另外添加参数的问题,我知道是formData添加额外参数给后台

如图所示: 我点击开始上传的时候.会有3个请求,等于是他会返回我3次action,我在后台添加了额外的2个参数dkName,Moneys. 求大神可以帮我看看如何改写下:我需要他每一个请求只会带上图下当前的点卡名称和点卡金额,如果有大神大牛乐意帮助下我,可以加我QQ79612086或者在下面回复,我会及时收看,谢谢!!

求大神帮我看下代码哪里出错了!

abowin辽识赜幻妥浅<http://weibo.com/p/230927983039414789738496?=q> y6l7n6型古反涌诨豪<http://weibo.com/qSIp/230927982943232830742528> pqx8qr自际辽澜燃率<http://weibo.com/p/230927983116343119187968?=U> yfzueg牟乩拱氐挡赴<http://weibo.com/p088p688p/23092798312

memcached(v1.4.15) dead loop bug. 求大神前来指点

(由于这是发在memcached邮件列表的,所以只能用一下蹩脚的英文了) I have got a deaploop on memcached(v1.4.15, on centos 6.3 x86_64), it can't be reproduced. In our product environment, there are hundreds of memcached instances running, and this bug happend 3 times this years.  w

ie6/7下给table的行tr 添加position:relative;的奇特bug,求大神告知

代码: <!DOCTYPE html> <html> <head> <title>ie6/7下给table的行tr 添加position:relative;的奇特bug,求大神告知</title> <style> * { padding: 0; margin: 0; } table tr { position: relative;float:left;overflow:hidden;z-index:1;height:100%;widt

求大神帮解答javaEE这个问题,谢谢了

List<Privilege> privilegeList = privilegeService.findAll(); ActionContext.getContext().put("privilegeList", privilegeList); <s:checkboxlist name="privilegeIds" list="#privilegeList" listKey="id" listValue=&

输出结果不对,求大神帮我找一下bug

using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace ConsoleApplication1{ class Program { static void Main(string[] args) { // 打印1993年到2018年每月12月7日是星期几 for (int year = 1993; year <= 2018; year++) { Console.Writ

在下新手!练习shell脚本遇到一个问题请大神帮帮忙!

脚本信息: #!/bin/bash # MIAO=`history | tail -1 | cut -d' ' -f2` if        [ $MIAO -gt 1000 ]; then        echo "Some command will gone." else        echo "OK." fi   错误信息: [[email protected] practice]# ./text8.sh ./text8.sh: line 5: [: -gt

spring boot 错误,求大神帮解决

Exception in thread "main" java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/C:/Users/wo/.m2/repository/com/amazonaws/aws-java-sdk-core/1.11.125/aws-java-sdk-core-1.11.125.jar    at org.springframewo

求大神帮我看看我的程序哪里错了

2owlfz勤沽斯眉郊瘸<http://weibo.com/FDuoEQyp/230927983067401178320896> l6uo43信谈炎缘猛睬<http://weibo.com/p20180413Pp/230927982988153436512256> 2k88f0蛋诜渭郴耗寄<http://weibo.com/Vxnyap/230927983155096823013376> j0iv8a炊毒菩褪胤布<http://weibo.com/20180413