请帮忙解释下程序,本人是初心者
程序无误,只是本人不理解,还请各位帮忙解释下,麻烦大家了 #include "iostream"
using namespace std;
int Am,An;
static int ASx,ASy;
void Func1();void Func2();void Func3();
int main()
{
cout<<"执行过Func1() \n";
Func1();
cout<<"Am的值是:"<<Am<<endl;
cout<<"An的值是:"<<An<<endl;
cout<<endl;
cout<<"执行过 Func2() \n";
Func2();
cout<<"Am的值是:"<<Am<<endl;
cout<<"An的值是:"<<An<<endl;
cout<<"执行过Func3() \n";
Func3();
cin.get();
return 0;
}
extern int Bp;
void Func3()
{
cout<<"Bp的值是:"<<Bp<<endl;
cout<<endl;
}
int Bp;
extern int Am;
void Func1()
{
Bp=2;
Am=8;
}
void Func2()
{
extern int An;
Am+=10;
An=27;
}
[[it] 本帖最后由 SD7436 于 2008-8-12 12:23 编辑 [/it]]