网址:
https://stackoverflow.com/questions/49890211/address-operator-and-array-in-assembly-level
在Answer里面提到:
The address of & operator allows you to construct a pointer to value from a
variable of same type as value.
中文翻译:address operator允许你建构一个指标(from一个变量to value,且这个变量有
跟value一样的type)
请问,这一行的意思是不是指,当执行程式这一行时:
p = &var1;
&本身也会占用一个variable的空间(用来放var1的address),然后在把这个address给p?
接下来,内文提到:
int *p = &A;
程式在做这行指令时,you are doing an assignment from a pointer to array of int
into a variable of type array of int, which is a different type.
光看这行英文,哪有different type,一样是array of int啊
还是他打错了?应该是from a pointer to int into a variable of type array of int?
谢谢。