再$ P $的GNU / Linux的psenting一个64位的整数 [英] Representing a 64 bit integer in GNU/Linux

查看:160
本文介绍了再$ P $的GNU / Linux的psenting一个64位的整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Ubuntu 10.10(64位) GCC ,我想用一个64位整数,我的C ++程序。

I am using Ubuntu 10.10 (64 bit) with gcc and I wanted to use a 64 bit integer in my C++ program.

在我的系统的sizeof(长)的sizeof(久长整型)和<$ C输出$ C>的sizeof(的int64_t)都是8个字节(64位)。

On my system the outputs of sizeof(long), sizeof(long long int) and sizeof(int64_t) are all 8 bytes (64 bits).

哪个预选赛(很长很长的int64_t ),你会推荐使用64位整数?

Which qualifier (long, long long, or int64_t) would you recommend for using 64 bit integers?

推荐答案

的int64_t - 这是因为它是最轻便的重presentation。另外两个可能是在其他机器上psented不同的重新$ P $。

int64_t -- This is because it is the most portable representation. The other two could be represented differently on other machines.

这篇关于再$ P $的GNU / Linux的psenting一个64位的整数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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