who can tell me why?
为什么这段代码运行之后没有任何结果呢?#include<iostream>
using namespace std;
class A
{int ia;
public:
A()
{ia=0;
cout<<"调用a默认构造符!"<<endl;
}
A(int ja)
{ia=ja;
cout<<"调用a参数构造符!"<<endl;
}
};
class B:public A
{int ib;
public:
B()
{ib=0;
cout<<"调用b默认构造符!"<<endl;
}
B(int jb):A(jb)
{ib=jb;
cout<<"调用b参数构造符!"<<endl;
}
};
int main()
{ A a();
B b();
system("pause");
return 0;
}