#include
#include
void test()
{
static int temp = 0;
printf("temp = %d.\n", temp);
temp ++;
return;
}
int main()
{
int i = 0;
for(i=0; i<10; i++)
{
test();
}
system("PAUSE");
}
运行结果:
temp = 0.
temp = 1.
temp = 2.
temp = 3.
temp = 4.
temp = 5.
temp = 6.
temp = 7.
temp = 8.
temp = 9.
请按任意键继续. . .
阅读(510) | 评论(0) | 转发(0) |