int64.cpp

来自「跨平台int 64位 整数封装类,测试环境vc6 gcc win2003」· C++ 代码 · 共 24 行

CPP
24
字号
// Int64.cpp : Defines the entry point for the console application.
//

#include <iostream>
#include "CommDefine.h"


int main(int argc, char* argv[])
{
	ULONG64  uI64=INT64C(0xFFFFFFFFFFFF23F);
	LONG64   I64=INT64C(0xFFFFFFFFF9);

	uI64 += 231;
	std::cout  << "UI64 is " << uI64 <<" and size is " <<sizeof(uI64) <<std::endl;
	std::cout  << "I64 is " <<" and size is " <<sizeof(I64) <<std::endl;
#ifdef WIN32
	printf("uI64 value is %I64u size is %d I64 is %I64d and size is %d \n",uI64,sizeof(uI64),I64,sizeof(I64));
#else
	printf("uI64 value is %llu size is %d I64 is %lld and size is %d \n",uI64,sizeof(uI64),I64,sizeof(I64));
#endif
	return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?