在自己的代码里面定义了 64位的整数 typedef long long int Jint64; 应用层的代码写 Jint64 nIndex = 99999999999; 编译报错 error: integer constant is too large for "long" type 但是我明明定义了long long int 不知道什么缘故
a.cpp代码: [aix操作系统]
#include
java中貌似没有支持8个字节的类型(这是我的猜测,因为找不到),但是有时候又要用,呵呵~至少我是,只好自己写了一个假的8字节类型int64,虽然不是很好,但将就可以用一用吧 ^_^ public class int64 { byte[] m_byteData; public int64() { m_byteData = new byte[8]; } public int64(String str) { m_byteData = new byte[8]; SetValue(str); } public byte[] Data()...
最近忙于将部分Windows下的程序移植到Linux下,可是遇到不少麻烦: 1, Linux下可以识别 __int64么? 如果可以识别,该包含什么头文件?不能识别,该如何定义64位的整型数据啊? 2, Linux下可以识别 WAVEFORMATEX 么? 如果可以识别,该包含什么头文件?不能识别,该如何定义这种数据类型啊? 3, Windows下 的 mmerg.h mmsystem.h 中定义了不少数据类型,Linux下有类似的 文件么? 小弟 刚学习 Linux 下的C/C++编程,请各位大侠...
sprintf(szBuf, "%ld", n); 这个系统long是8字节,int是4字节。%ld表示long型。 输出szBuf中的内容,为什么不出错呢? [ 本帖最后由 jerryhst 于 2009-5-15 14:29 编辑 ]
我用sizeof(int)测试了一下,是4, (fc6-x86_64, gcc只用文件名参数) 难道4位够了?超过4位大家都用浮点? 不可思议。 应该不是为了兼容32位代码吧?32位底下可以进v8086,可int还是4字节宽,不是2啊。。。