// sushengmiyanTest.cpp : 定义控制台应用程序的入口点。 // #include stdafx.h #includeusing namespace std; //静态函数练习 void f(int a) { while(a--) { // n只初始化一次,循环执行一次n会发生变化 static int n = 0; //x是局部变量,每次函数调用都初始化为0; int x = 0; cout<
// sushengmiyanTest.cpp : 定义控制台应用程序的入口点。 // #include stdafx.h #includeusing namespace std; //静态函数练习 void f(int a) { while(a--) { // n只初始化一次,循环执行一次n会发生变化 static int n = 0; //x是局部变量,每次函数调用都初始化为0; int x = 0; cout<