本文介绍了中的int64_t定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是新来的C / C ++,所以我有一对夫妇约一个基本类型的问题:
a)您能向我解释的int64_t 和长
(长之间的
的区别INT
)?
在我的理解,都是64位整数。是否有任何理由要选择一个比其他?
二)我试图查找
中的int64_t
在网络上的定义,但没有成功。有权威人士透露我需要这样的问题需要咨询?
c)对于code。使用
的int64_t
来编译,我目前包括< iostream的>
,这没有多大意义,我。是否还有其他包括提供的声明的int64_t
?
解决方案 The former is a signed integer type with exactly 64 bits. The latter is a signed integer type with at least 32 bits.
http://cppreference.com covers this here: http://en.cppreference.com/w/cpp/types/integer. The authoritative source, however, is the C++ standard (this particular bit can be found in §18.4 Integer types [cstdint]).
It is declared in <cstdint>
or <cinttypes>
(under namespace std
), or in <stdint.h>
or <inttypes.h>
(in the global namespace).
这篇关于中的int64_t定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!