变量超过2147483647? [英] Variable over 2147483647?

查看:113
本文介绍了变量超过2147483647?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个简单的问题,你怎么去存储一个超过2147483647(2 ^ 31-1)的整数?

Just a quick question, how do you go about storing an integer over 2147483647 (2^31-1)?

推荐答案


只是一个简单的问题,你如何存储超过2147483647(2 ^ 31-1)的整数?
Just a quick question, how do you go about storing an integer over 2147483647 (2^31-1)?



您可以使用unsigned long或long long。无符号长'的最大值是常规长度的两倍。但是,它只存储正值。如果你真的需要一个大号,请使用长多头或长签名。

如果你有兴趣,请点击这里:
http://msdn2.microsoft.com/en-us/lib...tz(VS。 80).aspx


有没有办法存储18,446,744,073,709,551,615以上的数字?
Is there any way to store a number above 18,446,744,073,709,551,615?



有没有办法存储18,446,744,073,709,551,615以上的数字?
Is there any way to store a number above 18,446,744,073,709,551,615?



不,我不相信你能。这使用了64位,而今天的计算机并不多,甚至支持那么多。最近才将处理器作为64位出现。你为什么要这么做?这是18 quintillion!

No, I don''t believe you can. That uses 64 bits and not many computers today even support that much. Only lately did processors came out as 64 bit. Why would you want to though? That''s 18 quintillion!


这篇关于变量超过2147483647?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆