我有这个代码:
char* hello = "Hello World";
std::cout << "Pointer value = " << hello << std::endl;
std::cout << "Pointer address = " << &hello << std::endl;
Run Code Online (Sandbox Code Playgroud)
这是结果:
Pointer value = Hello World
Pointer address = 0012FF74
Run Code Online (Sandbox Code Playgroud)
当我使用OllyDbg调试我的程序时,我看到0x0012FF74的值是例如0x00412374.
有什么方法可以打印hello指向的实际地址吗?