gpt4 book ai didi

c++ - 未定义 int64_t 的按位或?

转载 作者:太空宇宙 更新时间:2023-11-04 15:46:37 25 4
gpt4 key购买 nike

这是我正在尝试做的事情:

int64_t* h_out[ARRAY_SIZE];
int64_t result;
// some manipulations on h_out...
result = h_out[0] | h_out[1];

最后一行给出了这个错误:

error: expression must have integral or enum type

我不确定我是否理解错误的含义,但我猜它没有为 int64_t 定义的 | 运算符。在谷歌搜索此错误时,出现了几个类似的问题,其中许多问题涉及 % 运算符也没有为 int64_t 定义的事实。

那么...我如何对两个 64 位长整数进行位运算?如果它需要特定于 GCC,那么到目前为止我不关心可移植性很简单。无论如何,这是一个玩具任务。

最佳答案

h_out[0] 是指向 int64_t 的指针,而不是 int64_t

关于c++ - 未定义 int64_t 的按位或?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15707248/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com