求教c++问题,解释一下,谢谢
#include<iostream.h>classA{intx;public:A(inta):x(a){cout<<"constructingA";}};classB:p...
#include<iostream.h>
class A
{ int x;
public:
A(int a):x(a) {cout<<"constructing A";}
};
class B:public A
{
public:
B(){ cout<<"constructing B";}
};
void main()
{
B b;
} 展开
class A
{ int x;
public:
A(int a):x(a) {cout<<"constructing A";}
};
class B:public A
{
public:
B(){ cout<<"constructing B";}
};
void main()
{
B b;
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询