![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
#include <iostream>
using namespace std;
int onlyOnce()
{
static int icount = 0;
icount++;
cout<<icount<<endl;
return icount;
}
void output()
{
static int b = onlyOnce();
}
void main()
{
output();
output();
}结果: 1
posted @
2009-09-25 08:11
thinkpore
阅读(
315)
评论()
编辑
收藏
举报