70,020
社区成员




3楼的“在VC环境中编写C语言程序”不够准确。
你这里的VC是指老掉牙的VC6吧!
VC本来就是用来编译C++的,能够编译纯粹的C程序吗?
VC2005可以使用unsigned long long int.
#include <iostream>
#include <limits>
using namespace std;
int main()
{
cout<<numeric_limits<unsigned long long int>::max()<<endl;
}
//OUTPUT
18446744073709551615
请按任意键继续. . .
/*-
* file: longlong.c
* auth: mymtom
* date: 2008-08-19
*/
#include <sys/types.h>
#include <limits.h>
#include <stdio.h>
int
main(void)
{
long long a = 0x1111222233334444;
int64_t b = 0x1111222233334444;
long long c = 0x1111222233334444L;
int64_t d = 0x1111222233334444L;
long long e = 0x1111222233334444LL;
int64_t f = 0x1111222233334444LL;
unsigned long long g = 0xffffffffffffffffLL;
(void)printf("a = %#llx\n", a);
(void)printf("b = %#llx\n", b);
(void)printf("c = %#llx\n", c);
(void)printf("d = %#llx\n", d);
(void)printf("e = %#llx\n", e);
(void)printf("f = %#llx\n", f);
(void)printf("g = %#llx\n", g);
(void)printf("g = %#llu\n", g);
(void)printf("ULLONG_MAX = %#llu\n", ULLONG_MAX);
return 0;
}