64位系统指针占用字节数 | 您所在的位置:网站首页 › 地址占用几个字节 › 64位系统指针占用字节数 |
64位编译器,占用8个字节。 // testPointer.cpp : 定义控制台应用程序的入口点。 // #include “stdafx.h” int iGlobal; //全局 int GetValue() { int intGlobal = 99; //局部 return 1; } int main() { iGlobal = 2018; // intGlobal = 0; //为什么不可以访问函数内部的变量? char* pString = "hello world";#ifdef WIN32 printf_s(“32位程序地址占用字节数:%d\n”, sizeof(pString)); #else printf_s(“64位程序地址占用字节数:%d\n”, sizeof(pString)); #endif return 0; } 2018-11-23 10:37:56,友谊路。 |
CopyRight 2018-2019 实验室设备网 版权所有 |