http://www.360doc.com/content/12/0327/12/1016783_198221448.shtml
if (sizeof(char *)==4) { 32位; } else if (sizeof(char *)==8) { 64位; }
最简单的办法 if (sizeof(long) == 4) 32位 else if (sizeof(long) == 8) 64位;
Windows 下 运行-cmd 左上角路径 system32就是32位了! system64就是64位了
sizeof(void*)是内存地址的长度,单位是字节,当然是操作系统的位数啊
64,648
社区成员
250,503
社区内容
加载中
试试用AI创作助手写篇文章吧