gpt4 book ai didi

c - C中什么样的变量不能被寻址?

转载 作者:行者123 更新时间:2023-11-30 21:15:00 25 4
gpt4 key购买 nike

通常变量'abc'可以被寻址为'&abc'

c中什么样的变量不能被寻址?为什么?

最佳答案

C99 标准第 6.5.3.2 节解决了这个问题*(重点是我的):

The operand of the unary & operator shall be either a function designator, the result of a [] or unary * operator, or an lvalue that designates an object that is not a bit-field and is not declared with the register storage-class specifier.

<小时/> *哈哈

关于c - C中什么样的变量不能被寻址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15878162/

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