关于static
局部静态变量,用static 定义的,在局部,和主函数中怎么起作用比方说
int main()
{
static int a=2;
...
}
void other(void)
{
static int a=3;
a=a+3;
...
}
是否 other 中的a ,回到主函数中就不算了,再次回到other 中时保留?
2007-06-28 23:03
2007-06-29 01:30
2007-06-29 09:41
2007-06-29 13:28
2007-06-29 22:45

2007-06-30 08:17