标签:
1 #include <iostream> 2 3 using namespace std; 4 5 6 int main() 7 { 8 int v[2][2]={{1,2},{3,4}}; 9 cout<<"v = "<<v<<endl; 10 cout<<"*v = "<<*v<<" &v = "<<&v<<endl; 11 cout<<"*v+1 = "<<*v+1<<endl; 12 cout<<"*(v+1) = "<<*(v+1)<<" &v[1] = "<< &v[1]<<endl; 13 cout<<"v[0] = "<<v[0]<<" &v[0] = "<< &v[0]<<endl; 14 cout<<endl; 15 16 cout<<"**v = "<<**v<<endl; 17 cout<<"**(v+1) = "<<**(v+1)<<endl; 18 cout<<"*(*v+1) = "<<*(*v+1)<<endl; 19 cout<<"*(v[0]+1) = "<<*(v[0]+1)<<endl; 20 cout<<"*(v[1]) = "<<*(v[1])<<endl; 21 22 return 0; 23 }
标签:
原文地址:http://www.cnblogs.com/shouce/p/5433628.html