丑男的幸福生活鱼梦澜:这个程序是什么意思啊~~~~急~~`

来源:百度文库 编辑:高校问答 时间:2024/04/29 18:06:26
#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 关键字的用法,还有局部变量的作用域啊。