标签:
1 #include<iostream> 2 using namespace std; 3 4 static int n; //定义静态全局变量 5 6 void fn() 7 { 8 n++; 9 cout<<n<<endl; 10 } 11 12 int main(void) 13 { 14 n = 20; 15 cout<<n<<endl; 16 fn(); 17 return 0; 18 }
| 代码区 |
| 全局数据区 |
| 堆区 |
| 栈区 |
标签:
原文地址:http://www.cnblogs.com/njczy2010/p/5855781.html