gpt4 book ai didi

objective-c - 什么是_Complex?

转载 作者:行者123 更新时间:2023-12-03 04:52:00 25 4
gpt4 key购买 nike

阅读 Objective-C type encodings documentation (GCC 和 Apple 的页面在某种程度上是互补的),我偶然发现了 _Complex 关键字。我从未听说过它,当我尝试查找它时,我发现大量结果都在谈论它的错误使用,但从未听说过它真正做了什么。

什么是_Complex,它是如何工作的?

最佳答案

一种复数类型,看起来它使用实部的一半位宽和虚部的一半位宽:

_Complex double x; declares x as a variable whose real part and imaginary part are both of type double. _Complex short int y; declares y to have real and imaginary parts of type short int; this is not likely to be useful, but it shows that the set of complex types is complete.

关于“EXC_BAD_ACCESS _Complex 双返回”的帖子

关于objective-c - 什么是_Complex?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5283618/

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