【问题标题】:What is maximum number value of quint64 in Qt? [duplicate]Qt中quint64的最大数值是多少? [复制]
【发布时间】:2013-01-07 16:01:42
【问题描述】:

可能重复:
Where are the limits for Qt types?

我需要最大数量的 quint64 例如我们有一个用于 ulong ULONG_MAX 的宏

quint64 是否有任何相等的宏?

【问题讨论】:

  • 我猜根据它的名字它是64位类型......

标签: qt


【解决方案1】:

您可以在官方文档中找到答案:

quint64 是 unsigned long long int 的类型定义(unsigned __int64 在 Windows 上)。此类型保证在 Qt 支持的所有平台上都是 64 位的。

所以,quint64 是无符号整数的 64 位类型。 我们可以通过这种方式找到它的最大值:2^64-1 = 18446744073709551615。

因为它是老字号here,你可以通过包含#include <limits>得到相同的结果,输出结果为

std::numeric_limits<quint64>::max();

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-02
    • 2019-03-10
    • 2020-10-06
    • 1970-01-01
    • 1970-01-01
    • 2010-10-31
    • 1970-01-01
    相关资源
    最近更新 更多