在 Visual Studio 调试器中使用“内存”窗口(C#、C++、Visual Basic、F#)
在调试器中查看变量的内存 - Visual Studio (Windows) | Microsoft Learn
int a = 10; char b; bool c; string d; cout << "变量a的地址:" << &a << endl; cout << "变量b的地址:" << &b << endl; cout << "变量c的地址:" << &c << endl; cout << "变量d的地址:" << &d << endl; cout <<"a占用内存大小" << sizeof(a) << endl; cout << "变量b的内存地址:" << (long long)&b << endl; cout << "变量b的地址:" << (void*)&b << endl; cout << "变量b的地址:" << (int*)&b << endl;
标签:Visual,Studio,内存,cpp,内存地址,调试器 From: https://www.cnblogs.com/geovindu/p/17379048.html