int foo[2] = { 0, 1 };
int temp[3] = { 2,1,0 };
//temp = &foo;
cout << foo << endl;
cout << &foo << endl;
cout << &(foo[0]) << endl;//以上三个输出均相同
cout << &(foo[1]) << '\n'<<endl;
cout << temp << endl; //temp为指向int类型(首元素)的指针
cout << temp + 1 << endl; //步长为一个元素的大小
cout << &temp + 1 << '\n' << endl;//步长为一个数组的大小
void* p; //p能指向所有类型
p = &temp;
cout << p << endl;
cout << &p << '\n' << endl; //p本身的地址
//cout << *p << endl;//非法的间接寻址
int *q = temp;
cout << *(q + 1) << endl;
int(*a)[3] = &temp; //指向 int[3]类型数组 的指针
cout << *a << endl; //temp的地址
cout << **a << endl;
int vv[2][3] = { 1,2,3, 4,5,6 };
cout << vv << endl;
cout << vv + 1 << endl; //步长是一个维度的大小
cout << *vv + 1 << endl << endl;//步长为一个元素的大小
int(*p)[3] = &(*vv);//&(vv[0])
int(*pp)[2][3] = &(vv); *pp<=>vv
cout << *pp << endl;//输出vv的地址,*pp等价于vv
cout << (*pp)[1][2] << endl;
cout << **pp << endl;//输出*vv的地址,即第一维的首地址,**pp等价于*vv
cout << (**pp)[1] << endl; //<=>(*vv)[1]<=>vv[0][1]
cout << ***pp << endl;//输出第一维首元素的值
cout << *vv[1] << endl;//[]优先级高于* <=>vv[1][0]
cout << *vv[1] + 2 << endl;//vv[1][0] + 2