Assignment of address to integer variable

前端 未结 4 1011
萌比男神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:12

    Because in any literal starting 0x is actually an integer. So it is allowed. An address is can sometimes be an integer.

提交回复
热议问题