看得到在将a的地址转换为int时有报错
错误提示是:Cast from pointer to smaller type ‘int’ loses information
意思是:从指针转换为更小的类型“int”会丢失信息。
计算机是64位,取到的地址是超过了转换的int的边界,所以就会出错。
改成转换为long long 这样就不会越界出错

看得到在将a的地址转换为int时有报错
错误提示是:Cast from pointer to smaller type ‘int’ loses information
意思是:从指针转换为更小的类型“int”会丢失信息。
计算机是64位,取到的地址是超过了转换的int的边界,所以就会出错。
改成转换为long long 这样就不会越界出错