您的位置:首页 > 编程语言 > C语言/C++

64位Fedora运行32位C++程序中int精度溢出处理

2011-08-08 21:58 169 查看
在64-bit机器中编译32-bit的代码出现int(强制转换而至)精度溢出:

Debug==>

error: cast from ‘void*’ to ‘int’ loses precision

Solution==>

int -->intptr_t

Reference:

http://stackoverflow.com/questions/2024895/how-should-i-handle-cast-from-void-to-int-loses-precision-when-compiling-3
本文出自 “Turtle” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: