代码部分
#include <lontern.h>
int main()
{
const char** p = new const char* [10] {"abc", "123", "456"};
cout << **p << endl; //a
cout << **(p+1) << endl; //1
cout << *p << endl; //abc
cout << *(p+1) << endl; //123
cout << *(p+2) << endl; //45
delete p;
return 0;
}
看到p指针,其中保存了3个字符串常量的地址
第一块内存地址,*p=0x00007FF774D5BC74
注:0x61=97=a