/ *为什么静态变量值显示为0,即使它在显示中增加()* /
#include "iostream"
using namespace std;
int count = 0;
int display(int n)
{
count++;
if(n)
return 1+display(--n);
else
return 0;
}
int main()
{
cout << display(10) << " and count is " << count << endl;
return 0;
}