蔡諝的窝

博客园 首页 新随笔 联系 订阅 管理

2012年2月27日 #

摘要: 先看示例: 1 #include<iostream> 2 using namespace std; 3 void main() 4 { 5 int a[2][3]={{1,2,3},{4,5,6}}; 6 int (*pa)[3]=a; 7 int i=0; 8 int *p=*pa; 9 for(i=0;i<6;i++){10 cout<<*p<<" ";11 p++;12 }13 cout<<endl;14 cout<<**pa<<" "<<**(pa+1)&l 阅读全文
posted @ 2012-02-27 23:15 蔡諝 阅读(251) 评论(0) 推荐(0)

摘要: 先给出例题: 1 #include<iostream> 2 using namespace std; 3 struct rec_s 4 { 5 long lIndex; 6 short sLevel[6]; 7 char cPos; 8 }; 9 union u10 {11 char a[13];12 int b;13 };14 void main()15 {16 rec_s stMax,*pMax;17 char str[]="Hello";18 char *pChar=str;19 unsigned long ulGr... 阅读全文
posted @ 2012-02-27 21:54 蔡諝 阅读(361) 评论(0) 推荐(0)