pacco

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

 

1 #include <iostream>
2  using namespace std;
3
4  int fun(void)
5 {
6 static int count=10;
7 return count--;
8 }
9
10  int count =1;
11
12
13  int main()
14 {
15 printf("global\t\tlocal static\n");
16 for(;count<=10;count++)
17 {
18 printf("%d\t\t%d\n",count,fun());
19 }
20 return 0;
21 }

 

posted on 2010-09-13 10:59  pacco  阅读(147)  评论(0)    收藏  举报