69,369
社区成员
发帖
与我相关
我的任务
分享
// _vs08_consol_test.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <windows.h>
#include <iostream>
bool is_system64()
{
//unsigned long n = 1UL << 63;
ULONGLONG ull = 1;
void* n = (void*)(ull << 63);
return n;
}
int main(int argc, char *const argv[])
{
std::cout << is_system64() << std::endl;
return 0;
}
这段代码,测试了下:
XP_Home sp2 32位os ,打印出来是 0
vmware server 中 Win2003 Enterprise x64 Edition sp2 ,打印出来是 1
不知是否可以...#include <iostream>
bool is_system64()
{
unsigned long n = 1UL << 63;
return n;
}
int main(int argc, char *const argv[])
{
std::cout << is_system64() << std::endl;
return 0;
}
这样可以吗.