关于继承,引用,构造函数的问题
#include "iostream.h"
class A
{
public:
A(int a,int b) {cout<<"A"<<endl;}
};
class B:public A
{
public:
B(int c,int d);
};
B::B(int c, int d):A(int c,int d)
{
cout<<"B"<<endl;
};
void main()
{
int i=1,j=2,p=3,q=4;
A *show;
B *hi;
show->A(i,j);
hi->B(p,q);
}
为什么以上程序编译不通过?谢谢!
请详解!