gpt4 book ai didi

c++ - 移植程序,好奇 int16_t & __int16 是不是 'the same'

转载 作者:行者123 更新时间:2023-11-28 01:54:18 28 4
gpt4 key购买 nike

所以我正在将我的一个程序移植到一个新的游戏机上。问题是用于编译我的 c++ 应用程序的 SDK 不支持 __int16,但它支持 int16_t。使用 int16_t 代替 __int16 是否“安全”?
另外,如果我没记错的话,我可以只使用 unsigned short int 来表示 16 位 integer 而不是使用 int16_t__int16?

最佳答案

它们将是相同的。

在标准类型出现之前,人们习惯于定义自己的固定宽度类型。只需使用 typedef - 这就是它们的用途。

关于c++ - 移植程序,好奇 int16_t & __int16 是不是 'the same',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41754392/

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