马拉松比赛注意事项:这个程序是什么意思啊~~~~急~~`

来源:百度文库 编辑:中科新闻网 时间:2024/05/13 14:42:36
#include<iostream.h>
void other();
void main()
{
int a(3)
register int b(5);
static int c;
cout<<"a="<<a<<","<<"b="<<","<<"c="<<c<<endl;
other();
other();
}
void other()
{
int a(5);
static int b(12);
a+=10;
b+=20;
cout<<"a="<<a<<","<<"b="<<b<<endl;
}

找错误吗?
int a(3) 后面应加一个 分号

这个程序就是要演示register, static 关键字的用法,还有局部变量的作用域啊。