Assignment of address to integer variable

前端 未结 4 1035
萌比男神i
萌比男神i 2021-01-19 00:43

How come you can assign an address to an integer variable like this,the complier will not give an error. i always though you can only assign integer values to a integer vari

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-19 01:06

    You can also use *(int *)(Address) = value as a construct to assigne a value to Address and use the answer by @Luchian Grigore

提交回复
热议问题