#include <iostream> using namespace std; int main() { const char* a = "I am the data"; long long addr = (long long)(std::addressof(a)); cout << "address of a:" << addr << endl; const char* b = *(const char**)addr; cout << "b:" << b << endl; return 0; }
标签:std,对象,long,获取,地址,c++ From: https://www.cnblogs.com/nanfei/p/16954700.html