日期:2014-05-16 浏览次数:21020 次
/*-
* file: int64.c
* auth: mymtom
* date: 2008-08-19
*/
#include <sys/types.h>
#include <stdio.h>
int
main(void)
{
long long nLL = 0x1111222233334444LL;
int64_t n64 = 0x5555666677778888LL;
(void)printf("%llx\n", nLL);
(void)printf("%llx\n", n64);
return (0);
}
------解决方案--------------------
你用的就是64位,只不过你当32为打印出来。
要去掉warning:
man gcc
-Wlong-long
Warn if long long type is used. This is default. To inhibit the
warning messages, use -Wno-long-long. Flags -Wlong-long and
-Wno-long-long are taken into account only when -pedantic flag is
used.