您的位置:首页 > 其它

Cast from pointer to smaller type 'int' loses information解决方案

2015-03-07 11:09 711 查看
要适配amr64了,结果好多第三方库出了问题

searchPosMallocArray.Append(&searchPosMallocArray,(int)searchPosMalloc);
这句话报了Cast from pointer to smaller type 'int' loses information的错
如果指针是64位和整数都是32位的,一个int是太小,无法容纳一个指针的值。所以可能是这个原因造成的。
那么我们只该代码改成
searchPosMallocArray.Append(&searchPosMallocArray,(int)(size_t)searchPosMalloc);
就不会报错了,也就是将原来的(int)改为(int)(size_t)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐