Leonard

In theory, there is no difference between theory and practice. But, in practice, there is.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

什么也不说了,上代码~~

 

 1 #include <stdio.h>
 2 
 3 inline int change(int *a)
 4 {
 5     *= (*a) + 1//指针是个疯狂的东西,修改了const变量
 6     return *a;
 7 }
 8 
 9 int main()
10 {
11     const int a = 2;
12     int b;
13     printf("%d",a);
14     b = change(&a);
15     printf("%d%d",a,b);
16     return 0;
17 }
18 

 

 

posted on 2010-09-14 19:51  Leonard Tse  阅读(661)  评论(7)    收藏  举报